aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-pgp-context.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-pgp-context.c')
-rw-r--r--camel/camel-pgp-context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c
index 3f377909f7..292279b229 100644
--- a/camel/camel-pgp-context.c
+++ b/camel/camel-pgp-context.c
@@ -1347,7 +1347,8 @@ pgp_decrypt (CamelCipherContext *ctx, CamelStream *istream,
g_byte_array_free (ciphertext, TRUE);
g_free (passphrase);
- if (retval != 0 || !*plaintext) {
+ /* gpg returns '1' if it succeedes in decrypting but can't verify the signature */
+ if (!(retval == 0 || (context->priv->type == CAMEL_PGP_TYPE_GPG && retval == 1)) || !*plaintext) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"%s", diagnostics);
g_free (plaintext);