From: Brendan Cully Date: Mon, 1 Aug 2005 20:43:51 +0000 (+0000) Subject: Automatically forget PGP passphrase on sign or decrypt error. (closes #1025) X-Git-Tag: mutt-1-5-10-rel~83 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=efaf78ca40979ef3ee5ee3bbc095756e7fcf861b;p=mutt Automatically forget PGP passphrase on sign or decrypt error. (closes #1025) --- diff --git a/pgp.c b/pgp.c index 05ebb0a7..2bffc88b 100644 --- a/pgp.c +++ b/pgp.c @@ -920,7 +920,11 @@ void pgp_encrypted_handler (BODY *a, STATE *s) mutt_message _("PGP message successfully decrypted."); } else + { mutt_error _("Could not decrypt PGP message"); + /* void the passphrase, even if it's not necessarily the problem */ + pgp_void_passphrase (); + } fclose (fpout); mutt_unlink(tempfile); @@ -1020,6 +1024,8 @@ BODY *pgp_sign_message (BODY *a) if (empty) { unlink (sigfile); + /* most likely error is a bad passphrase, so automatically forget it */ + pgp_void_passphrase (); return (NULL); /* fatal error while signing */ }