]> granicus.if.org Git - mutt/commitdiff
Fix #1299; noted by David Shaw <dshaw@jabberwocky.com>.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 9 Sep 2002 20:40:31 +0000 (20:40 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 9 Sep 2002 20:40:31 +0000 (20:40 +0000)
postpone.c

index de42f1a3720a2f5ee2bb604672982ec018a37c85..4f072978ad156832f7f49381de66bef7f9613eeb 100644 (file)
@@ -547,6 +547,7 @@ int mutt_prepare_template (FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr,
 
 #ifdef HAVE_PGP
   /* decrypt pgp/mime encoded messages */
+  /* XXX - what happens with S/MIME encrypted messages?!?!?  - tlr, 020909*/
   if ((hdr->security & APPLICATION_PGP) && 
       mutt_is_multipart_encrypted (newhdr->content))
   {
@@ -581,7 +582,18 @@ int mutt_prepare_template (FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr,
   if (mutt_is_multipart_signed (newhdr->content))
   {
     newhdr->security |= SIGN;
-
+#ifdef HAVE_PGP
+    if (ascii_strcasecmp (mutt_get_parameter ("protocol", newhdr->content->parameter),
+                         "application/pgp-signature") == 0)
+      newhdr->security |= APPLICATION_PGP;
+#endif
+#if defined (HAVE_PGP) && defined (HAVE_SMIME)
+    else
+#endif
+#ifdef HAVE_SMIME
+      newhdr->security |= APPLICATION_SMIME;
+#endif
+    
     /* destroy the signature */
     mutt_free_body (&newhdr->content->parts->next);
     newhdr->content = mutt_remove_multipart (newhdr->content);