Lines 219-225
Link Here
|
219 |
continue; |
219 |
continue; |
220 |
} |
220 |
} |
221 |
|
221 |
|
222 |
if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0) |
222 |
if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0 || |
|
|
223 |
mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n") == 0) |
223 |
break; |
224 |
break; |
224 |
|
225 |
|
225 |
if (armor_header) |
226 |
if (armor_header) |
Lines 287-300
Link Here
|
287 |
clearsign = 0; |
288 |
clearsign = 0; |
288 |
start_pos = last_pos; |
289 |
start_pos = last_pos; |
289 |
|
290 |
|
290 |
if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0) |
291 |
if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 || |
|
|
292 |
mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0) |
291 |
needpass = 1; |
293 |
needpass = 1; |
292 |
else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0) |
294 |
else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 || |
|
|
295 |
mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0) |
293 |
{ |
296 |
{ |
294 |
clearsign = 1; |
297 |
clearsign = 1; |
295 |
needpass = 0; |
298 |
needpass = 0; |
296 |
} |
299 |
} |
297 |
else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15)) |
300 |
else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) || |
|
|
301 |
!mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15)) |
298 |
{ |
302 |
{ |
299 |
needpass = 0; |
303 |
needpass = 0; |
300 |
pgp_keyblock = 1; |
304 |
pgp_keyblock = 1; |
Lines 327-336
Link Here
|
327 |
|
331 |
|
328 |
fputs (buf, tmpfp); |
332 |
fputs (buf, tmpfp); |
329 |
|
333 |
|
330 |
if ((needpass && mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0) || |
334 |
if ((needpass && |
331 |
(!needpass |
335 |
(mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0 || |
332 |
&& (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 |
336 |
mutt_strcmp ("-----END PGP MESSAGE-----\r\n", buf) == 0)) || |
333 |
|| mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0))) |
337 |
(!needpass && |
|
|
338 |
(mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 || |
339 |
mutt_strcmp ("-----END PGP SIGNATURE-----\r\n", buf) == 0 || |
340 |
mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0 || |
341 |
mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\r\n",buf) == 0))) |
334 |
break; |
342 |
break; |
335 |
/* remember optional Charset: armor header as defined by RfC4880 */ |
343 |
/* remember optional Charset: armor header as defined by RfC4880 */ |
336 |
if (mutt_strncmp ("Charset: ", buf, 9) == 0) |
344 |
if (mutt_strncmp ("Charset: ", buf, 9) == 0) |
Lines 554-564
Link Here
|
554 |
{ |
562 |
{ |
555 |
if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0) |
563 |
if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0) |
556 |
{ |
564 |
{ |
557 |
if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0) |
565 |
if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 || |
|
|
566 |
mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0) |
558 |
enc = 1; |
567 |
enc = 1; |
559 |
else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0) |
568 |
else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 || |
|
|
569 |
mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0) |
560 |
sgn = 1; |
570 |
sgn = 1; |
561 |
else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0) |
571 |
else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0 || |
|
|
572 |
mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15) == 0) |
562 |
key = 1; |
573 |
key = 1; |
563 |
} |
574 |
} |
564 |
} |
575 |
} |
Lines 1067-1075
Link Here
|
1067 |
*/ |
1078 |
*/ |
1068 |
while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL) |
1079 |
while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL) |
1069 |
{ |
1080 |
{ |
1070 |
if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0) |
1081 |
if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0 || |
|
|
1082 |
mutt_strcmp ("-----BEGIN PGP MESSAGE-----\r\n", buffer) == 0) |
1071 |
fputs ("-----BEGIN PGP SIGNATURE-----\n", fp); |
1083 |
fputs ("-----BEGIN PGP SIGNATURE-----\n", fp); |
1072 |
else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0) |
1084 |
else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0 || |
|
|
1085 |
mutt_strcmp("-----END PGP MESSAGE-----\r\n", buffer) == 0) |
1073 |
fputs ("-----END PGP SIGNATURE-----\n", fp); |
1086 |
fputs ("-----END PGP SIGNATURE-----\n", fp); |
1074 |
else |
1087 |
else |
1075 |
fputs (buffer, fp); |
1088 |
fputs (buffer, fp); |