Bug 409851

Summary: "Import key" link in mails with attached PGP key doesn't do anything
Product: [Applications] kmail2 Reporter: Anton Kreuzkamp <akreuzkamp>
Component: cryptoAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kloecker
Priority: NOR    
Version: 5.11.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Anton Kreuzkamp 2019-07-16 08:20:21 UTC
Importing an attached PGP key from a received mail is not possible currently. The key is displayed correctly as a pgp key and a link to import the key is offered. Clicking on that link doesn't do anything, though. I couldn't find any way around it, like a way to save the key to the harddisk. In encrypted mails, not even the mail source code helps.

I don't have debug symbols available, unfortunately, so I can't verify, if ApplicationPgpKeyUrlHandler::handleClick is being called or not...

STEPS TO REPRODUCE
1. Receive an email with an attached PGP key, you don't have yet.
2. Open the mail and scroll down to the "OpenPGP Key" section.
3. Click on "Import key" and wonder why nothing happens at all.

OBSERVED RESULT
No visible reaction whatsoever, the key does not appear in kleopatra's key list afterwards

EXPECTED RESULT
Kleopatra opens, importing the key.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.16.2
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4
Comment 1 Ingo Klöcker 2023-05-05 08:48:52 UTC
I cannot reproduce this. I get the message "The key has been successfully imported" after clicking on "Import key". Even for an encrypted message with attached OpenPGP key I get this message although the actual import fails (see bug 469383).

Since your report says that "nothing happens at all", I assume that your problem has been fixed because in the current version the import is at least attempted and the result is reported.

If the problem still persists for you with the latest version of KMail (currently 5.23.0 in KDE Gear release 23.04.0), then please run KMail with GpgME debugging like this `GPGME_DEBUG=8 kmail` in Konsole.