On Fri, Aug 19, 2005 at 09:10:09AM -0400, Ken Weingold wrote: > > Christian has confirmed that this works; if a few other people could confirm > > it doesn't break PGP for them. > Worked for me too. Now I get: > But I think I always got that. I can read the message. I've just tested it, and unfortunately it isn't right. While it works in the sense that it stops mutt crashing, and you can read PGP signed and encrypted mail if all is well, it breaks the behaviour when you give PGP the wrong keyphrase. Now, instead of the output from PGP/GnuPG saying that you gave it the wrong keyphrase, you just get "Could not copy message", which isn't particularly helpful. The same applies to both of Tamo's patches. I don't know how to fix this, and I don't have the time to look at how the various bits are interacting. I suspect it's one of those things which is trivial if you understand how it all hangs together. Thomas...? (I've attached my version of the patch for reference purposes. Tamo's second is basically identical.) -- Paul
--- pgp.c 2005-08-19 09:41:18.000000000 +0100 +++ pgp-fix.c 2005-08-19 09:41:12.000000000 +0100 @@ -378,19 +378,19 @@ state_attach_puts (_("[-- End of PGP output --]\n\n"), s); } - } - /* treat empty result as sign of failure */ - rewind (pgpout); - if ((c = fgetc (pgpout)) == EOF) - { - mutt_error _("Could not decrypt PGP message"); - pgp_void_passphrase (); - rc = -1; - - goto out; - } - ungetc (c, pgpout); + /* treat empty result as sign of failure */ + rewind (pgpout); + if ((c = fgetc (pgpout)) == EOF) + { + mutt_error _("Could not decrypt PGP message"); + pgp_void_passphrase (); + rc = -1; + + goto out; + } + ungetc (c, pgpout); + } } /*
Attachment:
signature.asc
Description: Digital signature