Bug 296872 - Decryption fails for unknown reasons
Summary: Decryption fails for unknown reasons
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (show other bugs)
Version: 2.7.x
Platform: Debian stable Linux
: NOR major
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
Depends on: 296634
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-27 12:02 UTC by Rolf Eike Beer
Modified: 2012-06-12 06:56 UTC (History)
1 user (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 Rolf Eike Beer 2012-03-27 12:02:13 UTC
+++ This bug was initially created as a clone of Bug #296634 +++

Application: kgpg (2.7.60)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.7.4
Operating System: Linux 3.2.11-buche.1 x86_64
Distribution: Debian GNU/Linux 5.0.10 (lenny)

-- Information about the crash:
kgpg 4.8 was compiled from git master, running on 4.7.4 from Debian testing (wheezy), against libqt 4.7. The editor window opens as default. An encrypted message is being pasted into the window. Click on "Decrypt", both windows open: the one asking for m passphrase for decryption, and in the same instant a "decryption failed" message pops up in front of said decryption dialog window. I click away the message, enter my passphrase, hit OK and kgpg crashes.

The above information about my box running "Lenny" is wrong, it is Wheezy/Sid. Dunno where the Lenny info comes from.

The crash can be reproduced every time.

[New bug: crash is gone, but the decryption is still not working]
Comment 1 Rolf Eike Beer 2012-03-27 12:04:13 UTC
Can you please try if this works when you use the 4.8 branch?

switch to 4.8 branch in source dir: git checkout KDE/4.8
then rebuild and try again. The crash may happen again (will be fixed soon), but the interesting question is if the decryption works or not.
Comment 2 Andreas v. Heydwolff 2012-03-27 17:24:22 UTC
Thanks. I switched to branch as suggested, and unfortnately kgpg crashes before displaying any output of the decryption process.

$ kgpg
kgpg(3582) GnupgBinary::setBinary: checking version of GnuPG executable "/usr/bin/gpg"
kgpg(3582) GnupgBinary::setBinary: version is "1.4.12" 66572
kgpg(3582) KStatusBar::changeItem: KStatusBar::changeItem: bad item id:  0

user@host:~$ Enchant dict for "en_US" 0x13d2ef0 
kgpg(3582) Sonnet::Highlighter::slotRehighlight: Highlighter::slotRehighlight()
kgpg(3582) Sonnet::Highlighter::slotRehighlight: Highlighter::slotRehighlight()
kgpg(3582) Sonnet::Highlighter::slotRehighlight: Highlighter::slotRehighlight()
kgpg(3582) KGpgTransaction::start: KGpgDecrypt(0x1896a40) ("/usr/bin/gpg", "--no-secmem-warning", "--no-tty", "--no-greeting", "--options", "/home/avh/.gnupg/gpg.conf", "--status-fd=1", "--decrypt", "--command-fd=0")
kgpg(3582) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1896a40) "[GNUPG:] ENC_TO B2830F08F68118AF 16 0"
kgpg(3582) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1896a40) "[GNUPG:] ENC_TO 4D9482F55DCF0DD1 16 0"
kgpg(3582) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1896a40) "[GNUPG:] USERID_HINT 4D9482F55DCF0DD1 [KEY INFO]"
kgpg(3582) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1896a40) "[GNUPG:] NEED_PASSPHRASE 4D9482F55DCF0DD1 72B1B25BCCAD0A4B 16 0"
kgpg(3582) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1896a40) "[GNUPG:] GET_HIDDEN passphrase.enter"
KCrash: Application 'kgpg' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/avh/.kde/socket-buche/kdeinit4__11
Comment 3 Rolf Eike Beer 2012-03-27 20:19:20 UTC
Please do a "git pull" and rebuild. This very much looks like the same crash as in the original bug, which should now be fixed.
Comment 4 Andreas v. Heydwolff 2012-03-29 21:08:37 UTC
Hi again, sorry for the delay. Now I can click away the "Sorry" window but the "Password" window behind it also disappears. The editor window now does stay open but the passphrase can be entered nowhere. Greetings, A.

$ Enchant dict for "en_US" 0x1b5c560 
kgpg(7535) Sonnet::Highlighter::slotRehighlight: Highlighter::slotRehighlight()
kgpg(7535) KGpgTransaction::start: KGpgDecrypt(0x7f6c4017a370) ("gpg",
"--no-secmem-warning", "--no-tty", "--no-greeting", "--options",
"/home/avh/.gnupg/gpg.conf", "--status-fd=1", "--decrypt", "--command-fd=0")
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] ENC_TO B2830F08F68118AF 16 0"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] ENC_TO 4D9482F55DCF0DD1 16 0"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] USERID_HINT 4D9482F55DCF0DD1 [KEYINFO HERE]"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] NEED_PASSPHRASE 4D9482F55DCF0DD1 72B1B25BCCAD0A4B 16 0"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] GET_HIDDEN passphrase.enter"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] GOT_IT"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] BAD_PASSPHRASE 4D9482F55DCF0DD1"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] USERID_HINT 4D9482F55DCF0DD1" [KEYINFO HERE]
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] NEED_PASSPHRASE 4D9482F55DCF0DD1 72B1B25BCCAD0A4B 16 0"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] GET_HIDDEN passphrase.enter"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] GOT_IT"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] BAD_PASSPHRASE 4D9482F55DCF0DD1"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] USERID_HINT 4D9482F55DCF0DD1  [KEYINFO HERE]"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] NEED_PASSPHRASE 4D9482F55DCF0DD1 72B1B25BCCAD0A4B 16 0"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] GET_HIDDEN passphrase.enter"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] GOT_IT"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] BAD_PASSPHRASE 4D9482F55DCF0DD1"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] ERROR pkdecrypt_failed 11"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] NO_SECKEY B2830F08F68118AF"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] BEGIN_DECRYPTION"
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] DECRYPTION_FAILED"                                                    
kgpg(7535) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x7f6c4017a370)
"[GNUPG:] END_DECRYPTION"
Comment 5 Rolf Eike Beer 2012-03-29 21:42:02 UTC
Thanks for the feedback. In fact this is more or less expected behaviour: KGpg 
at this point thinks that the operation already failed (and that is the bug 
I'm trying to solve here). So it closes the password window since it can't 
serve any useful purpose anymore. The operation failed (and the gpg process 
could even be gone now), so entering a passphrase wouldn't lead you anywhere.
Comment 6 Rolf Eike Beer 2012-03-30 07:55:28 UTC
Ok, please do "git checkout master && git pull --rebase". This should get you 2 more checkins I've done that add slightly more debugging. Hopefully this will help me finally understand what's going wrong there.
Comment 7 Andreas v. Heydwolff 2012-03-30 14:12:03 UTC
Thanks. Here is the latest result: When I just click "Decrypt" there is no debugging output whatsoever. After marking the whole encrypted message and clicking "Decrypt" I get something that hopefully tells the problem:

kgpg(4818) Sonnet::Highlighter::slotRehighlight: Highlighter::slotRehighlight()                                        
kgpg(4818) Sonnet::Highlighter::slotAutoDetection:  Highlighter::slotAutoDetection : false
Comment 8 Rolf Eike Beer 2012-03-30 18:53:28 UTC
Looks like you didn't close the old KGpg before.
Comment 9 Andreas v. Heydwolff 2012-03-30 20:08:49 UTC
First time when retrieving the encrypted message again from the *.asc file kgpg had started because I accidentally clicked the file instead of using "Open with" [kwrite in that case]... Anyway, here is the latest output:

$ Enchant dict for "en_US" 0x17e4160 
kgpg(31522) Sonnet::Highlighter::slotRehighlight: Highlighter::slotRehighlight()
kgpg(31522) KGpgTransaction::start: KGpgDecrypt(0x1cb3b50) ("gpg", "--no-secmem-warning", "--no-tty", "--no-greeting", "--options", "/home/avh/.gnupg/gpg.conf", "--status-fd=1", "--decrypt", "--command-fd=0")
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] ENC_TO B2830F08F68118AF 16 0"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] ENC_TO 4D9482F55DCF0DD1 16 0"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] USERID_HINT 4D9482F55DCF0DD1 [KEY INFO]>"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] NEED_PASSPHRASE 4D9482F55DCF0DD1 72B1B25BCCAD0A4B 16 0"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] GET_HIDDEN passphrase.enter"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] GOT_IT"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] BAD_PASSPHRASE 4D9482F55DCF0DD1"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] USERID_HINT 4D9482F55DCF0DD1 [KEY INFO]"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] NEED_PASSPHRASE 4D9482F55DCF0DD1 72B1B25BCCAD0A4B 16 0"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] GET_HIDDEN passphrase.enter"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] GOT_IT"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] BAD_PASSPHRASE 4D9482F55DCF0DD1"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] USERID_HINT 4D9482F55DCF0DD1 [KEY INFO]"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] NEED_PASSPHRASE 4D9482F55DCF0DD1 72B1B25BCCAD0A4B 16 0"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] GET_HIDDEN passphrase.enter"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] GOT_IT"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] BAD_PASSPHRASE 4D9482F55DCF0DD1"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] ERROR pkdecrypt_failed 11"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] NO_SECKEY B2830F08F68118AF"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] BEGIN_DECRYPTION"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] DECRYPTION_FAILED"
kgpg(31522) KGpgTransactionPrivate::slotReadReady: KGpgDecrypt(0x1cb3b50) "[GNUPG:] END_DECRYPTION"
Comment 10 Andreas v. Heydwolff 2012-06-11 22:41:30 UTC
On 2012-06-11 22:33, Rolf Eike Beer wrote:
> https://bugs.kde.org/show_bug.cgi?id=296872
> 
> Rolf Eike Beer <kde@opensource.sf-tec.de> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Version|unspecified                 |2.7.x
> 


Hello,

thanks for taking care of the issue again. However, after upgrading to
KDE 4.8.3 a few weeks ago kgpg 2.7.60 compiled from git has been working
for me as expected.

The only issue left for me now is that encrypted text from a Windows
user with a header like this


-----BEGIN PGP MESSAGE-----
Charset: ISO-8859-15
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

does not get converted into UTF-8 so that German umlauts etc. are not
being represented correctly. I thought this was a problem in the Windows
application but after I installed Enigmail myself I could convert the
same messages properly with it.

Should I open a fresh bug report for this issue or is this due to
non-standard behavior of Enigmail and not a glitch of kgpg?

Greetings,
A.
Comment 11 Rolf Eike Beer 2012-06-12 06:56:07 UTC
KGpg currently does not look at that header at all. Please open a new feature request for this.