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

Modernize the check that the user IDs belong to the key

GnuPG-bug-id: 6115
parent ddaf31d3
......@@ -34,7 +34,7 @@ set(KF5_MIN_VERSION "5.96.0")
set(KIDENTITYMANAGEMENT_VERSION "5.21.40")
set(KMAILTRANSPORT_VERSION "5.21.40")
set(KMIME_VERSION "5.21.40")
set(LIBKLEO_VERSION "5.21.44")
set(LIBKLEO_VERSION "5.21.45")
set(QT_REQUIRED_VERSION "5.15.2")
set(GPGME_REQUIRED_VERSION "1.16.0")
......
......@@ -16,7 +16,9 @@
#include "exportopenpgpcertstoservercommand.h"
#include "dialogs/revokecertificationdialog.h"
#include <utils/keys.h>
#include <Libkleo/Algorithm>
#include <Libkleo/Formatting>
#include <Libkleo/KeyCache>
......@@ -231,12 +233,11 @@ void RevokeCertificationCommand::doStart()
return;
}
for (const UserID &uid : std::as_const(d->uids))
if (qstricmp(uid.parent().primaryFingerprint(), d->certificationTarget.primaryFingerprint()) != 0) {
qCWarning(KLEOPATRA_LOG) << "User ID <-> Key mismatch!";
d->finished();
return;
}
if (!Kleo::all_of(d->uids, userIDBelongsToKey(d->certificationTarget))) {
qCWarning(KLEOPATRA_LOG) << "User ID <-> Key mismatch!";
d->finished();
return;
}
d->ensureDialogCreated();
Q_ASSERT(d->dialog);
......
Supports Markdown
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