diff -u -r mutt-1.5.3/PATCHES mutt-1.5.3.ddm/PATCHES --- mutt-1.5.3/PATCHES Tue Nov 6 19:59:33 2001 +++ mutt-1.5.3.ddm/PATCHES Tue Nov 6 19:59:42 2001 @@ -1,0 +1 @@ +patch-1.5.3.ddm.pgp-auto-decode.1 diff -u -r mutt-1.5.3/commands.c mutt-1.5.3.ddm/commands.c --- mutt-1.5.3/commands.c 2002-12-11 06:20:04.000000000 -0500 +++ mutt-1.5.3.ddm/commands.c 2002-12-24 00:55:53.000000000 -0500 @@ -959,6 +959,7 @@ rv = 1; } + h->security |= PGP_TRADITIONAL_CHECKED; mx_close_message (&msg); return rv; } diff -u -r mutt-1.5.3/curs_main.c mutt-1.5.3.ddm/curs_main.c --- mutt-1.5.3/curs_main.c 2002-12-17 04:44:20.000000000 -0500 +++ mutt-1.5.3.ddm/curs_main.c 2002-12-24 00:54:41.000000000 -0500 @@ -1065,7 +1065,7 @@ case OP_DISPLAY_HEADERS: /* don't weed the headers */ CHECK_MSGCOUNT; - CHECK_VISIBLE; + CHECK_VISIBLE; /* * toggle the weeding of headers so that a user can press the key * again while reading the message. @@ -1083,6 +1083,10 @@ menu->current = mutt_thread_next_unread (Context, CURHDR); } +#ifdef HAVE_PGP + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); +#endif if ((op = mutt_display_message (CURHDR)) == -1) { unset_option (OPTNEEDRESORT); @@ -1737,6 +1741,10 @@ } #endif +#ifdef HAVE_PGP + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); +#endif mutt_edit_message (Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; @@ -1747,6 +1755,10 @@ CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; +#ifdef HAVE_PGP + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); +#endif ci_send_message (SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; @@ -1767,6 +1779,10 @@ CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_ATTACH; +#ifdef HAVE_PGP + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); +#endif ci_send_message (SENDREPLY|SENDGROUPREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; @@ -1776,6 +1792,10 @@ CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; +#ifdef HAVE_PGP + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); +#endif ci_send_message (SENDREPLY|SENDLISTREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; @@ -1903,6 +1923,10 @@ CHECK_ATTACH; CHECK_MSGCOUNT; CHECK_VISIBLE; +#ifdef HAVE_PGP + if (option (OPTPGPAUTODEC) && !(tag ? 0 : (CURHDR->security & PGP_TRADITIONAL_CHECKED))) + mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); +#endif ci_send_message (SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; diff -u -r mutt-1.5.3/init.h mutt-1.5.3.ddm/init.h --- mutt-1.5.3/init.h 2002-12-09 13:09:21.000000000 -0500 +++ mutt-1.5.3.ddm/init.h 2002-12-24 00:19:00.000000000 -0500 @@ -1296,7 +1296,7 @@ { "smime_ask_cert_label", DT_BOOL, R_NONE, OPTASKCERTLABEL, 1 }, /* ** .pp - ** This flag controls wether you want to be asked to enter a label for a certificate + ** This flag controls whether you want to be asked to enter a label for a certificate ** about to be added to the database or not. It is set by default. */ { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, OPTSDEFAULTDECRYPTKEY, 1 }, @@ -1308,6 +1308,16 @@ */ #endif #ifdef HAVE_PGP + { "pgp_auto_decode", DT_BOOL, R_NONE, OPTPGPAUTODEC, 0 }, + /* + ** .pp + ** If set, mutt will automatically attempt to decrypt traditional PGP + ** messages whenever the user performs an operation which ordinarily would + ** result in the contents of the message being operated on. For example, + ** if the user displays a pgp-traditional message which has not been manually + ** checked with the check-traditional-pgp function, mutt will automatically + ** check the message for traditional pgp. + */ { "pgp_entry_format", DT_STR, R_NONE, UL &PgpEntryFormat, UL "%4n %t%f %4l/0x%k %-4a %2c %u" }, /* ** .pp @@ -1643,7 +1653,7 @@ /* ** .pp ** This command is used to extract the mail address(es) used for storing - ** X509 certificates, and for verification purposes (to check, wether the + ** X509 certificates, and for verification purposes (to check, whether the ** certifacate was issued for the sender's mailbox). */ { "smime_sign_as", DT_SYN, R_NONE, UL "smime_default_key", 0 }, diff -u -r mutt-1.5.3/mutt.h mutt-1.5.3.ddm/mutt.h --- mutt-1.5.3/mutt.h 2002-12-06 11:37:21.000000000 -0500 +++ mutt-1.5.3.ddm/mutt.h 2002-12-23 23:06:10.000000000 -0500 @@ -445,6 +445,7 @@ #ifdef HAVE_PGP OPTPGPIGNORESUB, OPTPGPLONGIDS, + OPTPGPAUTODEC, #endif #if 0 OPTPGPENCRYPTSELF, diff -u -r mutt-1.5.3/pgplib.h mutt-1.5.3.ddm/pgplib.h --- mutt-1.5.3/pgplib.h 2002-12-11 06:20:05.000000000 -0500 +++ mutt-1.5.3.ddm/pgplib.h 2002-12-24 00:44:23.000000000 -0500 @@ -20,6 +20,7 @@ #ifdef HAVE_PGP #define APPLICATION_PGP (1 << 5) +#define PGP_TRADITIONAL_CHECKED (1 << 7) #define PGPENCRYPT (APPLICATION_PGP | ENCRYPT) #define PGPSIGN (APPLICATION_PGP | SIGN)