From: Brendan Cully Date: Tue, 2 Aug 2005 02:17:09 +0000 (+0000) Subject: Also forget passphrase when encrypt fails, if signing. (closes #1025 again) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8dbd85ee86540d1dea3e906ce77c8a0bbb917bbf;p=neomutt Also forget passphrase when encrypt fails, if signing. (closes #1025 again) --- diff --git a/pgp.c b/pgp.c index 88a720580..8ce45efd6 100644 --- a/pgp.c +++ b/pgp.c @@ -1274,6 +1274,8 @@ BODY *pgp_encrypt_message (BODY *a, char *keylist, int sign) if (empty) { /* fatal error while trying to encrypt message */ + if (sign) + pgp_void_passphrase (); /* just in case */ unlink (tempfile); return (NULL); } @@ -1448,6 +1450,8 @@ BODY *pgp_traditional_encryptsign (BODY *a, int flags, char *keylist) if (empty) { + if (flags & SIGN) + pgp_void_passphrase (); /* just in case */ unlink (pgpoutfile); return NULL; }