From: Jeffrey Stedfast Date: Fri, 3 Aug 2001 18:02:12 +0000 (+0000) Subject: Sigh, if gpg returns '1' it means that the key is bad but it did succeede X-Git-Tag: upstream/3.7.4~10779 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b50607892bb2f3238545d2808c64e6245e706305;p=platform%2Fupstream%2Fevolution-data-server.git Sigh, if gpg returns '1' it means that the key is bad but it did succeede 2001-08-03 Jeffrey Stedfast * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it means that the key is bad but it did succeede in decrypting the block so to make users happy (even though I find this a questionable action) we are going to ignore the error and show it to the user anyway. This fixes bug #6136. --- diff --git a/camel/ChangeLog b/camel/ChangeLog index 8de029b..8865ada 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2001-08-03 Jeffrey Stedfast + + * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it + means that the key is bad but it did succeede in decrypting the + block so to make users happy (even though I find this a + questionable action) we are going to ignore the error and show it + to the user anyway. This fixes bug #6136. + 2001-08-03 Not Zed * providers/smtp/camel-smtp-transport.c (smtp_connect): special diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c index 3f37790..292279b 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);