Commit 2f5147f3 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Do not include the default key if it has the wrong protocol

This fixes a regression introduced with 5de2f7ac.
parent 19e82d3d
Pipeline #63163 passed with stage
in 6 minutes and 59 seconds
......@@ -362,8 +362,17 @@ public:
// Fallback to unknown protocol
defaultKey = defaultKeys.value (GpgME::UnknownProtocol);
// make sure that the default key is not filtered out
// make sure that the default key is not filtered out unless it has the wrong protocol
if (filterProto == GpgME::UnknownProtocol) {
} else {
const auto key = KeyCache::instance()->findByFingerprint(defaultKey.toLatin1().constData());
if (!key.isNull() && key.protocol() == filterProto) {
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment