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

Add definition and fix private implementation of setSigningKeys()

GnuPG-bug-id: 5283
parent 747be904
......@@ -215,10 +215,15 @@ public:
}
}
void setSigningKeys(const std::vector<Key> &keys)
void setSigningKeys(const QStringList &fingerprints)
{
if (mSign) {
for (const auto &key: keys) {
for (const auto &fpr: fingerprints) {
const auto key = mCache->findByKeyIDOrFingerprint(fpr.toUtf8().constData());
if (key.isNull()) {
qCDebug(LIBKLEO_LOG) << "Failed to find signing key with fingerprint" << fpr;
continue;
}
auto list = mSigKeys.value(key.protocol());
list.push_back(key);
mSigKeys.insert(key.protocol(), list);
......@@ -561,6 +566,11 @@ void KeyResolver::setOverrideKeys(const QMap<Protocol, QMap<QString, QStringList
}
}
void KeyResolver::setSigningKeys(const QStringList &fingerprints)
{
d->setSigningKeys(fingerprints);
}
QMap <Protocol, QMap<QString, std::vector<Key> > > KeyResolver::encryptionKeys() const
{
return d->mEncKeys;
......
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