summaryrefslogtreecommitdiffstats
path: root/attach.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2002-01-24 21:53:19 +0000
committerThomas Roessler <roessler@does-not-exist.org>2002-01-24 21:53:19 +0000
commit85ef6f6ab6cfba38f0857f67b6be467ffa426765 (patch)
tree747114477bea4e9281d33a97e44ff914445ad420 /attach.c
parentc6d96bc112ff0dfc5f312d31c9ea29ee5b630b9a (diff)
S/MIME support. From Oliver Ehli <elmy@acm.org> and Mike Schiraldi
<raldi@research.netsol.com>.
Diffstat (limited to 'attach.c')
-rw-r--r--attach.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/attach.c b/attach.c
index 3a7bcbcd..5921ddf2 100644
--- a/attach.c
+++ b/attach.c
@@ -32,6 +32,10 @@
#include "pgp.h"
#endif
+#ifdef HAVE_SMIME
+#include "smime.h"
+#endif
+
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
@@ -413,10 +417,11 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
int unlink_tempfile = 0;
is_message = mutt_is_message_type(a->type, a->subtype);
-#ifdef HAVE_PGP
- if (is_message && a->hdr && (a->hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase())
+#if defined(HAVE_PGP) || defined(HAVE_SMIME)
+ if (is_message && a->hdr && (a->hdr->security & ENCRYPT) &&
+ !crypt_valid_passphrase(a->hdr->security))
return (rc);
-#endif /* HAVE_PGP */
+#endif /* HAVE_PGP || HAVE_SMIME */
use_mailcap = (flag == M_MAILCAP ||
(flag == M_REGULAR && mutt_needs_mailcap (a)));
snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);