[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] Make tls.el support certificate verification

From: Elias Oltmanns
Subject: Re: [Patch] Make tls.el support certificate verification
Date: Tue, 27 Nov 2007 12:10:50 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7)

Reiner Steib <address@hidden> wrote:
> Committed.  Thank you for your contributions.

I am very sorry to say that I've just discovered a rather awkward
mistake in my patch.  The variable tls-checktrust isn't even referenced
anywhere, hence only parts of the advertised functionality are provided
so far.  Please find attached a patch to fix this issue.

I really am sorry for making all the fuss and then not getting it right
in the first place.

> Some remarks for future contributions:
> See http://article.gmane.org/gmane.emacs.gnus.commits/5529 for my
> cosmetic/style changes.

In the cvs trunk I can see that you made some adjustments to line breaks
as well.  What is the maximum line length in doc strings?  Also, is
there a comprehensive source for information about Emacs and Gnus
codingstyle and good practice?  And what is the canonical way to provide
ChangeLog entries if I have no commit privileges or, to put it another
way, the attached patch alright in this respect?



Index: lisp/ChangeLog
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1674
diff -u -r7.1674 ChangeLog
--- lisp/ChangeLog      25 Nov 2007 18:25:12 -0000      7.1674
+++ lisp/ChangeLog      27 Nov 2007 11:02:51 -0000
@@ -1,3 +1,9 @@
+2007-11-27  Elias Oltmanns  <address@hidden>
+       * tls.el: (open-tls-stream): Actually consult tls-checktrust to see if
+       certs should be verified and what is to be done in the event of a
+       verification failure.
 2007-11-25  Romain Francoise  <address@hidden>
        * gnus-msg.el (gnus-summary-reply): Delete extra paren.
Index: lisp/tls.el
RCS file: /usr/local/cvsroot/gnus/lisp/tls.el,v
retrieving revision 7.18
diff -u -r7.18 tls.el
--- lisp/tls.el 25 Nov 2007 14:17:03 -0000      7.18
+++ lisp/tls.el 27 Nov 2007 11:02:52 -0000
@@ -229,12 +229,15 @@
        (set-buffer buffer)
-            (and tls-untrusted
+            (and tls-checktrust
                    (goto-char (point-min))
                    (re-search-forward tls-untrusted nil t))
-                 (not (yes-or-no-p
-                       (format "The certificate presented by `%s' is NOT 
trusted. Accept anyway? " host))))
+                 (or 
+                  (and (not (eq tls-checktrust 'ask))
+                       (message "The certificate presented by `%s' is NOT 
trusted." host))
+                  (not (yes-or-no-p
+                        (format "The certificate presented by `%s' is NOT 
trusted. Accept anyway? " host)))))
             (and tls-hostmismatch
                    (goto-char (point-min))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]