diff options
Diffstat (limited to 'framework/src/domain/mime/mailcrypto.cpp')
-rw-r--r-- | framework/src/domain/mime/mailcrypto.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/src/domain/mime/mailcrypto.cpp b/framework/src/domain/mime/mailcrypto.cpp index f25c75fe..83ce293a 100644 --- a/framework/src/domain/mime/mailcrypto.cpp +++ b/framework/src/domain/mime/mailcrypto.cpp | |||
@@ -400,7 +400,7 @@ Expected<GpgME::Error, KMime::Content *> createSignedEmail(KMime::Content *conte | |||
400 | 400 | ||
401 | KMime::Content *MailCrypto::processCrypto(KMime::Content *content, | 401 | KMime::Content *MailCrypto::processCrypto(KMime::Content *content, |
402 | const std::vector<GpgME::Key> &signingKeys, const std::vector<GpgME::Key> &encryptionKeys, | 402 | const std::vector<GpgME::Key> &signingKeys, const std::vector<GpgME::Key> &encryptionKeys, |
403 | const GpgME::Key &attachedKey, MailCrypto::Protocol protocol) | 403 | const GpgME::Key &attachedKey) |
404 | { | 404 | { |
405 | 405 | ||
406 | qDebug() << "Attaching key:" << attachedKey.shortKeyID() << "from processCrypto"; | 406 | qDebug() << "Attaching key:" << attachedKey.shortKeyID() << "from processCrypto"; |
@@ -425,7 +425,7 @@ void MailCrypto::importKeys(const std::vector<GpgME::Key> &keys) | |||
425 | job->exec(keys); | 425 | job->exec(keys); |
426 | } | 426 | } |
427 | 427 | ||
428 | static GpgME::KeyListResult listKeys(GpgME::Protocol protocol, const QStringList &patterns, bool secretOnly, int keyListMode, std::vector<GpgME::Key> &keys) | 428 | static GpgME::KeyListResult listKeys(const QStringList &patterns, bool secretOnly, int keyListMode, std::vector<GpgME::Key> &keys) |
429 | { | 429 | { |
430 | QByteArrayList list; | 430 | QByteArrayList list; |
431 | std::transform(patterns.constBegin(), patterns.constEnd(), std::back_inserter(list), [] (const QString &s) { return s.toUtf8(); }); | 431 | std::transform(patterns.constBegin(), patterns.constEnd(), std::back_inserter(list), [] (const QString &s) { return s.toUtf8(); }); |
@@ -434,7 +434,7 @@ static GpgME::KeyListResult listKeys(GpgME::Protocol protocol, const QStringList | |||
434 | pattern.push_back(0); | 434 | pattern.push_back(0); |
435 | 435 | ||
436 | GpgME::initializeLibrary(); | 436 | GpgME::initializeLibrary(); |
437 | auto ctx = QSharedPointer<GpgME::Context>{GpgME::Context::createForProtocol(protocol)}; | 437 | auto ctx = QSharedPointer<GpgME::Context>{GpgME::Context::createForProtocol(GpgME::OpenPGP)}; |
438 | ctx->setKeyListMode(keyListMode); | 438 | ctx->setKeyListMode(keyListMode); |
439 | if (const GpgME::Error err = ctx->startKeyListing(pattern.data(), secretOnly)) { | 439 | if (const GpgME::Error err = ctx->startKeyListing(pattern.data(), secretOnly)) { |
440 | return GpgME::KeyListResult(0, err); | 440 | return GpgME::KeyListResult(0, err); |
@@ -452,10 +452,10 @@ static GpgME::KeyListResult listKeys(GpgME::Protocol protocol, const QStringList | |||
452 | return result; | 452 | return result; |
453 | } | 453 | } |
454 | 454 | ||
455 | std::vector<GpgME::Key> MailCrypto::findKeys(const QStringList &filter, bool findPrivate, bool remote, Protocol protocol) | 455 | std::vector<GpgME::Key> MailCrypto::findKeys(const QStringList &filter, bool findPrivate, bool remote) |
456 | { | 456 | { |
457 | std::vector<GpgME::Key> keys; | 457 | std::vector<GpgME::Key> keys; |
458 | GpgME::KeyListResult res = listKeys(protocol == SMIME ? GpgME::CMS : GpgME::OpenPGP, filter, findPrivate, remote ? GpgME::Extern : GpgME::Local, keys); | 458 | GpgME::KeyListResult res = listKeys(filter, findPrivate, remote ? GpgME::Extern : GpgME::Local, keys); |
459 | if (res.error()) { | 459 | if (res.error()) { |
460 | qWarning() << "Failed to lookup keys: " << res.error().asString(); | 460 | qWarning() << "Failed to lookup keys: " << res.error().asString(); |
461 | return keys; | 461 | return keys; |