diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-16 02:46:48 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-16 02:46:48 +0200 |
commit | 6054ee4a24193c28bd6160fde555c4a5e1f044a4 (patch) | |
tree | 1872898e83eb0871cee1c0d73e0125d24664e814 | |
parent | d87ba100ac9d012e13eddbeb460c0a658860311f (diff) | |
download | kube-6054ee4a24193c28bd6160fde555c4a5e1f044a4.tar.gz kube-6054ee4a24193c28bd6160fde555c4a5e1f044a4.zip |
Lacking a key to verify the signature is not "bad".
-rw-r--r-- | framework/src/domain/mime/mimetreeparser/messagepart.cpp | 9 | ||||
-rw-r--r-- | framework/src/domain/mime/partmodel.cpp | 8 |
2 files changed, 12 insertions, 5 deletions
diff --git a/framework/src/domain/mime/mimetreeparser/messagepart.cpp b/framework/src/domain/mime/mimetreeparser/messagepart.cpp index 611a04c5..256b7588 100644 --- a/framework/src/domain/mime/mimetreeparser/messagepart.cpp +++ b/framework/src/domain/mime/mimetreeparser/messagepart.cpp | |||
@@ -696,7 +696,14 @@ static QString prettifyDN(const char *uid) | |||
696 | 696 | ||
697 | void SignedMessagePart::sigStatusToMetaData(const Signature &signature) | 697 | void SignedMessagePart::sigStatusToMetaData(const Signature &signature) |
698 | { | 698 | { |
699 | mMetaData.isGoodSignature = signature.status == GPG_ERR_NO_ERROR; | 699 | mMetaData.isGoodSignature = signature.status.errorCode() == GPG_ERR_NO_ERROR; |
700 | if (!mMetaData.isGoodSignature) { | ||
701 | if (signature.status.errorCode() == GPG_ERR_NO_PUBKEY) { | ||
702 | qWarning() << "No public key to verify signature."; | ||
703 | } else { | ||
704 | qWarning() << "Is no good signature" << signature.status; | ||
705 | } | ||
706 | } | ||
700 | // save extended signature status flags | 707 | // save extended signature status flags |
701 | auto summary = signature.summary; | 708 | auto summary = signature.summary; |
702 | mMetaData.keyMissing = summary & GPGME_SIGSUM_KEY_MISSING; | 709 | mMetaData.keyMissing = summary & GPGME_SIGSUM_KEY_MISSING; |
diff --git a/framework/src/domain/mime/partmodel.cpp b/framework/src/domain/mime/partmodel.cpp index bbafbc7c..ca8856fd 100644 --- a/framework/src/domain/mime/partmodel.cpp +++ b/framework/src/domain/mime/partmodel.cpp | |||
@@ -267,12 +267,12 @@ QVariant PartModel::data(const QModelIndex &index, int role) const | |||
267 | 267 | ||
268 | if (messageIsSigned) { | 268 | if (messageIsSigned) { |
269 | auto sigInfo = std::unique_ptr<SignatureInfo>{signatureInfo(messagePart)}; | 269 | auto sigInfo = std::unique_ptr<SignatureInfo>{signatureInfo(messagePart)}; |
270 | if (!sigInfo->signatureIsGood || sigInfo->keyRevoked) { | 270 | if (!sigInfo->signatureIsGood) { |
271 | if (sigInfo->keyMissing || sigInfo->keyExpired) { | ||
272 | return "notsogood"; | ||
273 | } | ||
271 | return "bad"; | 274 | return "bad"; |
272 | } | 275 | } |
273 | if (sigInfo->keyMissing || sigInfo->keyExpired) { | ||
274 | return "notsogood"; | ||
275 | } | ||
276 | } | 276 | } |
277 | //All good | 277 | //All good |
278 | if (messageIsSigned || messageIsEncrypted) { | 278 | if (messageIsSigned || messageIsEncrypted) { |