diff options
Diffstat (limited to 'framework/src')
-rw-r--r-- | framework/src/domain/mime/crypto.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/src/domain/mime/crypto.cpp b/framework/src/domain/mime/crypto.cpp index 9722dba8..1b121931 100644 --- a/framework/src/domain/mime/crypto.cpp +++ b/framework/src/domain/mime/crypto.cpp | |||
@@ -211,6 +211,10 @@ std::pair<DecryptionResult,VerificationResult> Crypto::decryptAndVerify(CryptoPr | |||
211 | auto err = gpgme_op_decrypt_verify(ctx, Data{ciphertext}.data, out); | 211 | auto err = gpgme_op_decrypt_verify(ctx, Data{ciphertext}.data, out); |
212 | if (err) { | 212 | if (err) { |
213 | qWarning() << "Failed to decrypt and verify" << Error{err}; | 213 | qWarning() << "Failed to decrypt and verify" << Error{err}; |
214 | //We make sure we don't return any plain-text if the decryption failed to prevent EFAIL | ||
215 | if (err == GPG_ERR_DECRYPT_FAILED) { | ||
216 | return std::make_pair(DecryptionResult{{}, {err}}, VerificationResult{{}, {err}}); | ||
217 | } | ||
214 | } | 218 | } |
215 | 219 | ||
216 | VerificationResult verificationResult{{}, {err}}; | 220 | VerificationResult verificationResult{{}, {err}}; |