2005-06-16 Arne Jørgensen <arne@arnested.dk>
authorSimon Josefsson <jas@extundo.com>
Thu, 16 Jun 2005 12:39:43 +0000 (12:39 +0000)
committerSimon Josefsson <jas@extundo.com>
Thu, 16 Jun 2005 12:39:43 +0000 (12:39 +0000)
* smime.el (smime-cert-by-ldap-1): Detect PEM format without
header by looking for magic "MII" at the beginnig.

lisp/ChangeLog
lisp/smime.el

index feeccc4..0a9510e 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-16  Arne J\e,Ax\e(Brgensen  <arne@arnested.dk>
+
+       * smime.el (smime-cert-by-ldap-1): Detect PEM format without
+       header by looking for magic "MII" at the beginnig.
+
 2005-06-16  Miles Bader  <miles@gnu.org>
 
        * gnus-xmas.el (gnus-xmas-group-startup-message):
index 57ba873..b2aa29d 100644 (file)
@@ -599,9 +599,8 @@ A string or a list of strings is returned."
          ;; header/footer) so we try to handle them anyway.
          (if (or (string= (substring (cadaar ldapresult) 0 27)
                           "-----BEGIN CERTIFICATE-----")
-                 (condition-case nil
-                     (base64-decode-string (cadaar ldapresult))
-                   (error nil)))
+                 (string= (substring (cadaar ldapresult) 0 3)
+                          "MII"))
              (setq cert
                    (smime-replace-in-string
                     (cadaar ldapresult)