From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61996 Path: news.gmane.org!not-for-mail From: Arne =?iso-8859-1?Q?J=F8rgensen?= Newsgroups: gmane.emacs.gnus.general Subject: Patch for smime.el (smime-cert-by-ldap-1) Date: Tue, 14 Feb 2006 23:07:56 +0100 Organization: Arne Joergensen -- http://arnested.dk/ Message-ID: <87mzgt8ugz.fsf@arnested.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1139963260 28823 80.91.229.2 (15 Feb 2006 00:27:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2006 00:27:40 +0000 (UTC) Cc: Simon Josefsson Original-X-From: ding-owner+m10524@lists.math.uh.edu Wed Feb 15 01:27:38 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F9AW4-0008Pi-8O for ding-account@gmane.org; Wed, 15 Feb 2006 01:27:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F9AW0-0003se-00; Tue, 14 Feb 2006 18:27:28 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F98L8-0003k7-00 for ding@lists.math.uh.edu; Tue, 14 Feb 2006 16:08:06 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1F98L3-0005qu-0T for ding@lists.math.uh.edu; Tue, 14 Feb 2006 16:08:06 -0600 Original-Received: from mailfe07.swip.net ([212.247.154.193] helo=swip.net) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F98Kz-0003Ly-00 for ; Tue, 14 Feb 2006 23:07:57 +0100 X-T2-Posting-ID: NNVMZ8eA2KPcG6NmtUxgoA== X-Cloudmark-Score: 0.000000 [] Original-Received: from arnested.dk ([213.237.94.152] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 5.0.2) with ESMTP id 123084755; Tue, 14 Feb 2006 23:07:56 +0100 Original-To: ding@gnus.org X-Face: 5t,7/Y$&<1A_t.$vC2{pWZ{m@3_06;kcm]no{hgEL/}Uz(>XV6cl4}xO\v?-h3%>znNaZtq `~rf,GY1T%r=a.zH`hOb(-]'x)nI088Z&|e;V^h;/TShou User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61996 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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, --=20 Arne J=F8rgensen --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=smime.patch Content-Transfer-Encoding: 8bit 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 + + * smime.el (smime-cert-by-ldap-1): Fix bug where + `smime-ldap-search' returns results without userCertificates. + 2006-02-10 Reiner Steib * 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 --=-=-=--