1 --- mutt-1.1.11.orig/init.h Sun Apr 2 23:40:02 2000
2 +++ mutt-1.1.11/init.h Sun Apr 2 23:41:08 2000
4 ** lead to problems with non-verifyable PGP signatures, so only change
5 ** this if you know what you are doing.
7 + { "pgp_paranoid", DT_BOOL, R_NONE, OPTPGPPARANOID, 0 },
8 { "pgp_timeout", DT_NUM, R_NONE, UL &PgpTimeout, 300 },
11 --- mutt-0.95/mutt.h.orig Sat Dec 12 09:06:47 1998
12 +++ mutt-0.95/mutt.h Sun Jan 3 03:39:19 1999
21 --- mutt-0.95/patchlist.c.orig Sun Jan 3 03:11:41 1999
22 +++ mutt-0.95/patchlist.c Sun Jan 3 03:39:19 1999
27 + printf("Feature patch: condense_pgp 0.95 by Stefan `Sec` Zehl\n");
31 /* DO NOT MODIFY AFTER THIS LINE */
32 --- mutt-0.95/pgp.c.orig Sat Dec 12 09:07:00 1998
33 +++ mutt-0.95/pgp.c Sun Jan 3 03:41:29 1999
39 + * Scan PGP output; return information about state of signature.
40 + * Flush the message (on stdout).
42 + * If strat==0, the message is piped to PGP on stdin, the verified
43 + * message is output on stdout, and runtime messages are on stderr.
44 + * If strat==1, the message comes from a file, and the runtime
45 + * messages are on stdout.
49 +mutt_scan_pgp_output (FILE *infile, FILE *outfile, STATE *outstate)
51 + int sigstate=0, pgpwarning=0;
53 + char buffer[LONG_STRING];
55 + while (fgets (buffer, sizeof(buffer), infile) != NULL) {
56 + if (strncmp (buffer, "Good signature", 14) == 0)
59 + if (strncmp (buffer, "WARNING", 7) == 0 &&
60 + strstr (buffer, "not certified") != NULL)
63 + if (strncmp (buffer, "Bad signature", 13) == 0)
65 + if (strncmp (buffer, "\007Key matching", 13) == 0 &&
66 + strstr (buffer, "not found") != NULL)
69 + if (strncmp (buffer, "WARNING", 7) == 0)
71 + if (strncmp (buffer, "\007WARNING", 7) == 0)
73 + if (strncmp (buffer, "Error", 5) == 0)
75 + if (strncmp (buffer, "\007Error", 5) == 0)
79 + if (strncmp(buffer, "\007Key matching", 13) == 0 &&
80 + strstr (buffer, "not found") != NULL)
82 + if (strncmp(buffer, "File '", 6) == 0 &&
83 + strstr (buffer, "has signature, but with no text") != NULL)
85 + if (strncmp(buffer, "Text is assumed to be in file '", 31) == 0)
88 + if (strncmp(buffer, "No files specified. Using stdin.", 33) == 0)
90 + if (strncmp(buffer, "Opening file \"stdout\" type text.", 32) == 0)
92 + if (strncmp(buffer, "Message is encrypted.", 21) == 0)
94 + /* pgp5 bogon makes pgp2 warn */
95 + if (strncmp(buffer, "Warning",7) == 0 &&
96 + strstr (buffer, "header label \"MessageID:\" ignored") != NULL)
99 + if(buffer[0]=='\n'){
106 + if (strlen(buffer)>2 && buffer[strlen(buffer)-2]=='\007')
107 + buffer[strlen(buffer)-2]=' ';
108 + else if (strlen(buffer)>3 && buffer[strlen(buffer)-3]=='\007')
109 + buffer[strlen(buffer)-3]=' ';
111 + if (buffer[0] == '\007') {
112 + state_puts(buffer+1, outstate);
115 + state_puts(buffer, outstate);
119 + if (buffer[0] == '\007') {
120 + fputs(buffer+1, outfile);
123 + fputs(buffer, outfile);
128 + sigstate |= (pgpwarning<<4);
134 /* Support for the Application/PGP Content Type. */
136 void application_pgp_handler (BODY *m, STATE *s)
140 if (s->flags & M_DISPLAY)
141 + if(option(OPTPGPPARANOID))
142 pgp_current_time (s);
144 + mutt_scan_pgp_output(pgperr,NULL,s);
146 mutt_wait_filter (thepid);
148 @@ -345,17 +444,17 @@
151 if (s->flags & M_DISPLAY)
152 - state_puts (_("\n[-- End of PGP output --]\n\n"), s);
153 + state_puts (_("\n[-- End of PGP output --"), s);
156 if(s->flags & M_DISPLAY)
159 - state_puts (_("[-- BEGIN PGP MESSAGE --]\n\n"), s);
160 + state_puts ("BEGIN PGP MESSAGE --]\n\n", s);
161 else if (pgp_keyblock)
162 - state_puts (_("[-- BEGIN PGP PUBLIC KEY BLOCK --]\n"), s);
163 + state_puts ("BEGIN PGP PUBLIC KEY BLOCK --]\n", s);
165 - state_puts (_("[-- BEGIN PGP SIGNED MESSAGE --]\n\n"), s);
166 + state_puts ("BEGIN PGP SIGNED MESSAGE --]\n\n", s);
169 /* Use PGP's output if there was no clearsig signature. */
170 diff -Nru mutt-1.1.11.orig/pgp.c mutt-1.1.11/pgp.c
171 --- mutt-1.1.11.orig/pgp.c Sun Apr 2 23:49:51 2000
172 +++ mutt-1.1.11/pgp.c Sun Apr 2 23:51:58 2000
174 -1, -1, fileno(pgperr),
175 tempfile, sigfile)) != -1)
177 + if(option(OPTPGPPARANOID))
178 mutt_copy_stream(pgpout, s->fpout);
180 + mutt_scan_pgp_output(pgpout,NULL,s);