]> granicus.if.org Git - neomutt/commitdiff
Also forget passphrase when encrypt fails, if signing. (closes #1025 again)
authorBrendan Cully <brendan@kublai.com>
Tue, 2 Aug 2005 02:17:09 +0000 (02:17 +0000)
committerBrendan Cully <brendan@kublai.com>
Tue, 2 Aug 2005 02:17:09 +0000 (02:17 +0000)
pgp.c

diff --git a/pgp.c b/pgp.c
index 88a72058019eadb6497bb1d6f15fe5c38cea5a8a..8ce45efd61604742bea92ef079f3135eb82ac272 100644 (file)
--- 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;
   }