aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReiner Steib <[email protected]>2007-11-22 20:26:33 +0000
committerReiner Steib <[email protected]>2007-11-22 20:26:33 +0000
commit145cc6b9ea127439b239ffddbcbbf687170b759c (patch)
treebd3b789b0e3eec1c4577dd053b3a840af282fdca
parente3e7216217d8df0261e4e317c7d2e368d78a9377 (diff)
(smime-cert-by-ldap-1): Use `ldap-search' instead of
`smime-ldap-search' for Emacs 22 and up.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/smime.el14
2 files changed, 16 insertions, 3 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index f2c2b7d8e9..d6b555cf23 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-22 Reiner Steib <[email protected]>
+
+ * 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 <[email protected]>
* gnus-art.el (gnus-article-truncate-lines): Use `truncate-lines'.
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el
index 592500d5de..f58339ed58 100644
--- a/lisp/gnus/smime.el
+++ b/lisp/gnus/smime.el
@@ -122,7 +122,6 @@
;;; Code:
(require 'dig)
-(require 'smime-ldap)
(require 'password)
(eval-when-compile (require 'cl))
@@ -589,8 +588,17 @@ A string or a list of strings is returned."
(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)