Gnus development mailing list
 help / color / mirror / Atom feed
From: "Arne Jørgensen" <arne@arnested.dk>
Cc: Simon Josefsson <simon@josefsson.org>
Subject: Patch for smime.el (smime-cert-by-ldap-1)
Date: Tue, 14 Feb 2006 23:07:56 +0100	[thread overview]
Message-ID: <87mzgt8ugz.fsf@arnested.dk> (raw)

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

Hi,

I just ran in to a person who was registered at my LDAP server but had
no certificate stored there. This patch will handle such cases without
errors.

Kind regards,
-- 
Arne Jørgensen <http://arnested.dk/>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: smime.patch --]
[-- Type: text/x-patch, Size: 1356 bytes --]

Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.996
diff -u -p -r7.996 ChangeLog
--- lisp/ChangeLog	10 Feb 2006 18:36:55 -0000	7.996
+++ lisp/ChangeLog	14 Feb 2006 22:02:17 -0000
@@ -1,3 +1,8 @@
+2006-02-14  Arne J^[,Ax^[(Brgensen  <arne@arnested.dk>
+
+	* smime.el (smime-cert-by-ldap-1): Fix bug where
+	`smime-ldap-search' returns results without userCertificates.
+
 2006-02-10  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* gnus-group.el (gnus-group-make-tool-bar): Remove duplicate check
Index: lisp/smime.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/smime.el,v
retrieving revision 7.20
diff -u -p -r7.20 smime.el
--- lisp/smime.el	8 Feb 2006 04:17:15 -0000	7.20
+++ lisp/smime.el	14 Feb 2006 22:02:17 -0000
@@ -594,7 +594,8 @@ A string or a list of strings is returne
 				       host '("userCertificate") nil))
 	(retbuf (generate-new-buffer (format "*certificate for %s*" mail)))
 	cert)
-    (if (>= (length ldapresult) 1)
+    (if (and (>= (length ldapresult) 1)
+             (> (length (cadaar ldapresult)) 0))
 	(with-current-buffer retbuf
 	  ;; Certificates on LDAP servers _should_ be in DER format,
 	  ;; but there are some servers out there that distributes the

             reply	other threads:[~2006-02-14 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14 22:07 Arne Jørgensen [this message]
2006-02-15 13:53 ` Simon Josefsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mzgt8ugz.fsf@arnested.dk \
    --to=arne@arnested.dk \
    --cc=simon@josefsson.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).