Bug 437091 - Saving edited identity clears cryptographic keys not matching email address
Summary: Saving edited identity clears cryptographic keys not matching email address
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: config dialog (show other bugs)
Version: 5.16.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Ingo Klöcker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-14 15:12 UTC by Ingo Klöcker
Modified: 2021-05-14 15:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.18.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Klöcker 2021-05-14 15:12:47 UTC
I have a few identities where the email address does not match any of the
user ids of the OpenPGP keys configured for those identities. (Note: Because of bug 404700 it is currently not easily possible to set cryptographic keys that do not match the email address for an identity.)

If I edit such an identity in the configuration dialog, then the OpenPGP signing/encryption key drop down boxes on the Cryptography tab show "No key" instead of the key I have set for this identity.
-> I expect to see the configured keys there.

If I save the edited identity after having opened the Cryptography tab, then
the OpenPGP keys of the edited identity are cleared.
-> Obviously, I except KMail not to clear the keys silently.
Comment 1 Ingo Klöcker 2021-05-14 15:26:22 UTC
Git commit 5de2f7ac770c6982f98837018cd7ae2a29686501 by Ingo Klöcker.
Committed on 14/05/2021 at 15:15.
Pushed by kloecker into branch 'master'.

Always include the default key in the list of keys to chose from

Add custom subclass of KeyListSortFilterProxyModel that allows specifying
a key that is always accepted by the filtering. Use this subclass
to make sure that the default key is not filtered out.

This fixes the problem that KMail didn't show keys not matching
the email address of an identity in the identity configuration dialog
and that KMail cleared the keys silently if one saved such an identity
after opening the Cryptography tab.

Funded by: Intevation GmbH
FIXED-IN: 5.18.0

M  +39   -3    src/ui/keyselectioncombo.cpp

https://invent.kde.org/pim/libkleo/commit/5de2f7ac770c6982f98837018cd7ae2a29686501