[kmail2] [Bug 469383] New: Importing an OpenPGP key attached to an encrypted message doesn't work

Ingo Klöcker bugzilla_noreply at kde.org
Fri May 5 09:40:54 BST 2023


https://bugs.kde.org/show_bug.cgi?id=469383

            Bug ID: 469383
           Summary: Importing an OpenPGP key attached to an encrypted
                    message doesn't work
    Classification: Applications
           Product: kmail2
           Version: 5.23.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: crypto
          Assignee: kdepim-bugs at kde.org
          Reporter: kloecker at kde.org
  Target Milestone: ---

SUMMARY
Importing an OpenPGP key attached to an encrypted message doesn't work.

STEPS TO REPRODUCE
1. You need an encrypted message with an attached OpenPGP key.
2. Open the message, decrypt it, and click on "Import key".

OBSERVED RESULT
KMail reports "The key has been successfully imported.". But gpg and Kleopatra
don't list the key.

EXPECTED RESULT
Importing the key works. And KMail should report a failure if the import failed
for some reason (e.g. corrupt OpenPGP key). 

ADDITIONAL INFORMATION
Running kmail with `GPGME_DEBUG=8` I get the following
```
2023-05-05 10:21:51 gpgme[19116.4aac]           _gpgme_io_write: check:
-----BEGIN PGP MESSAGE-----<LF>
2023-05-05 10:21:51 gpgme[19116.4aac]           _gpgme_io_write: check: <LF>
2023-05-05 10:21:51 gpgme[19116.4aac]           _gpgme_io_write: check:
hF4D0z8hfWyIqqISAQdARIzZlxp2IopOOxw8pVC8L+NV3yCu
2023-05-05 10:21:51 gpgme[19116.4aac]           _gpgme_io_write: check:
Fgmuk1yDG66tmR4w<LF>
[...]
2023-05-05 10:21:51 gpgme[19116.4aac]           _gpgme_io_write: check:
=/TYt<LF>
2023-05-05 10:21:51 gpgme[19116.4aac]           _gpgme_io_write: check:
-----END PGP MESSAGE-----
[...]
2023-05-05 10:21:51 gpgme[19116.4aac]         _gpgme_io_read: check: [GNUPG:]
NODATA 1<LF>
2023-05-05 10:21:51 gpgme[19116.4aac]         _gpgme_io_read: check: [GNUPG:]
IMPORT_RES 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
```

This shows two things:
* KMail passes the encrypted message body instead of the attached key to the
crypto backend.
* The crypto backend reports that no data was found, but KMail still reports
success.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list