From: Thomas Roessler Date: Wed, 13 Mar 2002 12:31:01 +0000 (+0000) Subject: Assorted patches from Mike Schiraldi. X-Git-Tag: mutt-1-5-1-rel~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76f4bd34f401fa7bd45eb1d4f19460a07b1f1621;p=mutt Assorted patches from Mike Schiraldi. --- diff --git a/doc/smime-notes.txt b/doc/smime-notes.txt index a8cc3077..1d651ea9 100644 --- a/doc/smime-notes.txt +++ b/doc/smime-notes.txt @@ -3,6 +3,8 @@ How to add use mutt's S/MIME capabilities - Add the contents of contrib/smime.rc to your .muttrc. Don't worry about changing the smime_sign_as line at this point -- you'll change it later. +- Run 'smime_keys init'. + - Download and install OpenSSL. - Get yourself a certificate. (You can get one for free from www.thawte.com, @@ -40,7 +42,7 @@ How to add use mutt's S/MIME capabilities - You probably want to import the trusted roots in contrib/ca-bundle.crt. This makes you trust anything that was ultimately - signed by one of them. You can use "smime_keys.pl add_root" to do so, or + signed by one of them. You can use "smime_keys add_root" to do so, or just copy ca-bundle.crt into the place you point mutt's smime_ca_location variable to. diff --git a/smime.c b/smime.c index 422741f5..df4d9cdf 100644 --- a/smime.c +++ b/smime.c @@ -103,7 +103,9 @@ int mutt_is_application_smime (BODY *m) if (m->type & TYPEAPPLICATION && m->subtype) { - if (!mutt_strcasecmp (m->subtype, "x-pkcs7-mime")) + /* S/MIME MIME types don't need x- anymore, see RFC2311 */ + if (!mutt_strcasecmp (m->subtype, "x-pkcs7-mime") || + !mutt_strcasecmp (m->subtype, "pkcs7-mime")) { if ((t = mutt_get_parameter ("smime-type", m->parameter))) { @@ -113,6 +115,12 @@ int mutt_is_application_smime (BODY *m) return (SMIMESIGN|SMIMEOPAQUE); else return 0; } + /* Netscape 4.7 uses + * Content-Description: S/MIME Encrypted Message + * instead of Content-Type parameter + */ + if (!mutt_strcasecmp (m->description, "S/MIME Encrypted Message")) + return SMIMEENCRYPT; complain = 1; } else if (mutt_strcasecmp (m->subtype, "octet-stream")) @@ -374,9 +382,9 @@ static void smime_entry (char *s, size_t l, MUTTMENU * menu, int num) truststate = N_("Unknown "); } if (this.public) - snprintf(s, l, " 0x%.8X%i %s %-35.35s %s", this.hash, this.suffix, truststate, this.email, this.nick); + snprintf(s, l, " 0x%.8X.%i %s %-35.35s %s", this.hash, this.suffix, truststate, this.email, this.nick); else - snprintf(s, l, " 0x%.8X%i %-35.35s %s", this.hash, this.suffix, this.email, this.nick); + snprintf(s, l, " 0x%.8X.%i %-35.35s %s", this.hash, this.suffix, this.email, this.nick); }