+2007-11-22 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * smime.el (smime-cert-by-ldap-1): Use `ldap-search' instead of
+ `smime-ldap-search' for Emacs 22 and up.
+
2007-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
* gnus-art.el (gnus-article-truncate-lines): Use `truncate-lines'.
;;; Code:
(require 'dig)
-(require 'smime-ldap)
(require 'password)
(eval-when-compile (require 'cl))
(defun smime-cert-by-ldap-1 (mail host)
"Get cetificate for MAIL from the ldap server at HOST."
- (let ((ldapresult (smime-ldap-search (concat "mail=" mail)
- host '("userCertificate") nil))
+ (let ((ldapresult
+ (funcall
+ (if (or (featurep 'xemacs)
+ ;; For Emacs >= 22 we don't need smime-ldap.el
+ (< emacs-major-version 22))
+ (progn
+ (require 'smime-ldap)
+ 'smime-ldap-search)
+ 'ldap-search)
+ (concat "mail=" mail)
+ host '("userCertificate") nil))
(retbuf (generate-new-buffer (format "*certificate for %s*" mail)))
cert)
(if (and (>= (length ldapresult) 1)