Bug 132227 - I can't send gpg signed email
Summary: I can't send gpg signed email
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: encryption (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-10 21:37 UTC by Luca Niverini
Modified: 2015-04-12 10:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Niverini 2006-08-10 21:37:29 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Debian testing/unstable Packages
OS:                Linux

When I send a pgp signed message a Dialog tell me that the signing has fail for unknown reason.
On the shell thi message is printed:
ASSERT: "!mSignature.isNull()" in /build/buildd/kdepim-3.5.3/build-tree/kdepim-3.5.3/kmail/messagecomposer.cpp (2158)
Comment 1 Allen Winter 2006-08-10 21:41:50 UTC
The source code says

"if you hit this, check gpg-agent is running, then blame gpgme."

I agree there should be a real error message.  I will look into doing that.
Let me know if gpg-agent is running and gpgme stuff is setup correctly.
Comment 2 Allen Winter 2006-08-10 22:01:15 UTC
SVN commit 571824 by winterz:

Give a nicer error message if gpg-agent isn't found.
BUGS: 132227
GUI:


 M  +5 -3      messagecomposer.cpp  


--- branches/KDE/3.5/kdepim/kmail/messagecomposer.cpp #571823:571824
@@ -2155,9 +2155,11 @@
   }
 
   mSignature = signature;
-  Q_ASSERT( !mSignature.isNull() ); // if you hit this, check gpg-agent is running, then blame gpgme.
-  if ( mSignature.isNull() ) {
-    KMessageBox::error( mComposeWin, i18n( "The signing operation failed for an unknown reason." ) );
+  if ( mSignature.isEmpty() ) {
+    KMessageBox::sorry( mComposeWin,
+                        i18n( "The signing operation failed. "
+                              "Please make sure that the gpg-agent program "
+                              "is running." ) );
   }
 }
 
Comment 3 Luca Niverini 2006-08-11 21:53:34 UTC
gpg-agent is running:

~/.kde$ ps aux|grep gpg
s   2254  0.0  0.0   3700   784 ?        Ss   20:49   0:00 /usr/bin/gpg-agent --daemon --sh
s   2279  0.0  0.0   3708   852 ?        Ss   20:49   0:00 gpg-agent --daemon
s   2550  0.0  0.0   3080   708 pts/2    R+   20:55   0:00 grep gpg

I stopped it and send a mail to see the difference.
A messagebox with many text says that gpg-agent is present but not running, and ask me for passphrase.

I checked my system state and find that the problem begin after the upgrade of gnupg-agent and gpgsm, from version 1.9.20-1 to 1.9.20-2, so the problem probably is in gnupg-agent, but downgrading to previous version doesn't solve the problem.
Anyway I think the message "Please make sure that the gpg-agent program is running." is wrong, gpg-agent *is* running.
Comment 4 engage 2008-11-22 02:29:10 UTC
I have a similar problem since upgrading from KDE 3.5 to 4.1 (Mandriva 2009.0). I get a "bad passphrase" dialog box even though I wasn't prompted for a passphrase. gpg-agent is running.
Comment 5 Mike Frysinger 2009-02-10 02:39:13 UTC
just because the agent is running doesnt mean the active env is sane.  in other words, a gpg-agent session could be started by your login shell and so all children inherit the env that points to that session.  if sometime later that agent is killed and a new one is started, your kmail will still have the old info.

the same situation might happen with stale env data and gpg-agent wasnt started properly in the first place, or a different hierarchy.

you can double check this by doing something like:
$ strings /proc/$(pidof kmail)/environ | grep GPG
GPG_AGENT_INFO=/tmp/gpg-D0Refl/S.gpg-agent:30053:1

that second to last number will be the pid:
$ ps up 30053
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
vapier   30053  0.0  0.0  15344   568 ?        Ss    2008   1:01 gpg-agent --daemon

if those things dont line up, then try quitting kmail, launching konsole, checking GPG_AGENT_INFO is correct, then run `kmail` manually.
Comment 6 Laurent Montel 2015-04-12 10:21:18 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.