From 8f8ec0c1fe76d3cf5797deb4dd8882ba6a4fe532 Mon Sep 17 00:00:00 2001 From: krion Date: Tue, 31 Aug 2004 08:11:05 +0000 Subject: Add a patch to correctly handle attachments in S/MIME encrypted and signed messages (especially those generated by Outlook). PR: ports/71181 Submitted by: maintainer --- mail/mutt-devel/Makefile | 2 +- mail/mutt-devel/files/patch-smime-recvattach | 39 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 mail/mutt-devel/files/patch-smime-recvattach (limited to 'mail/mutt-devel') diff --git a/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile index 3c689ca52e7a..1a11b965d782 100644 --- a/mail/mutt-devel/Makefile +++ b/mail/mutt-devel/Makefile @@ -81,7 +81,7 @@ PORTNAME= mutt-devel PORTVERSION= 1.5.6 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES+= mail ipv6 .if defined(WITH_MUTT_NNTP) CATEGORIES+= news diff --git a/mail/mutt-devel/files/patch-smime-recvattach b/mail/mutt-devel/files/patch-smime-recvattach new file mode 100644 index 000000000000..92fa0e2df698 --- /dev/null +++ b/mail/mutt-devel/files/patch-smime-recvattach @@ -0,0 +1,39 @@ +diff -u -r3.13 recvattach.c +--- recvattach.c 12 Apr 2004 20:33:33 -0000 3.13 ++++ recvattach.c 30 Aug 2004 20:26:30 -0000 +@@ -913,18 +913,33 @@ + mx_close_message (&msg); + return; + } +- if ((WithCrypto & APPLICATION_SMIME) && hdr->security & APPLICATION_SMIME) ++ if ((WithCrypto & APPLICATION_SMIME) && (hdr->security & APPLICATION_SMIME)) + { + if (hdr->env) + crypt_smime_getkeys (hdr->env); + + if (mutt_is_application_smime(hdr->content)) ++ { + secured = ! crypt_smime_decrypt_mime (msg->fp, &fp, + hdr->content, &cur); ++ ++ /* S/MIME nesting */ ++ if ((mutt_is_application_smime (cur) & SMIMEOPAQUE)) ++ { ++ BODY *_cur = cur; ++ FILE *_fp = fp; ++ ++ fp = NULL; cur = NULL; ++ secured = !crypt_smime_decrypt_mime (_fp, &fp, _cur, &cur); ++ ++ mutt_free_body (&_cur); ++ safe_fclose (&_fp); ++ } ++ } + else + need_secured = 0; + } +- if ((WithCrypto & APPLICATION_PGP) && hdr->security & APPLICATION_PGP) ++ if ((WithCrypto & APPLICATION_PGP) && (hdr->security & APPLICATION_PGP)) + { + if (mutt_is_multipart_encrypted(hdr->content)) + secured = !crypt_pgp_decrypt_mime (msg->fp, &fp, hdr->content, &cur); -- cgit