]> granicus.if.org Git - neomutt/commitdiff
Assorted patches from Mike Schiraldi.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 13 Mar 2002 12:31:01 +0000 (12:31 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 13 Mar 2002 12:31:01 +0000 (12:31 +0000)
doc/smime-notes.txt
smime.c

index a8cc3077403657d5fcb9cfcb4a2b35975e17ce4e..1d651ea938bc30f13c02efe7a800e5a99423a061 100644 (file)
@@ -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 422741f5a7bf03f4023a883bf179cea0a447523a..df4d9cdf32ec25662660fdba3afa555309576674 100644 (file)
--- 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);
 }