all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Elias Oltmanns <eo@nebensachen.de>
To: emacs-devel@gnu.org
Cc: ding@gnus.org
Subject: Re: [Patch] Make tls.el support certificate verification
Date: Tue, 27 Nov 2007 12:10:50 +0100	[thread overview]
Message-ID: <871wacrlj9.fsf@denkblock.local> (raw)
In-Reply-To: v9k5o71gb3.fsf@marauder.physik.uni-ulm.de

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

Reiner Steib <reinersteib+gmane@imap.cc> 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?

Regards,

Elias


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

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  <eo@nebensachen.de>
+
+	* 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  <romain@orebokech.com>
 
 	* 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)
 	(when
 	    (or
-	     (and tls-untrusted
+	     (and tls-checktrust
 		  (progn
 		    (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
 		  (progn
 		    (goto-char (point-min))

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  parent reply	other threads:[~2007-11-27 11:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-16 23:08 [Patch] Make tls.el support certificate verification Elias Oltmanns
2007-09-24  7:12 ` Simon Josefsson
2007-09-24 16:27   ` Reiner Steib
2007-09-25 14:42     ` Simon Josefsson
2007-11-08 18:44       ` Elias Oltmanns
2007-11-08 19:52         ` Reiner Steib
2007-11-16 17:22           ` Elias Oltmanns
2007-11-16 22:38             ` Reiner Steib
2007-11-16 23:07               ` Elias Oltmanns
2007-11-24 21:31                 ` Reiner Steib
2007-11-25  0:35                   ` Elias Oltmanns
2007-11-25 14:18                     ` Reiner Steib
2007-11-26 14:47                       ` Simon Josefsson
2007-11-27 11:10                   ` Elias Oltmanns [this message]
2007-11-28 22:05                     ` Reiner Steib
2007-11-28 22:08                     ` Coding conventions (was: [Patch] Make tls.el support certificate verification) Reiner Steib

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=871wacrlj9.fsf@denkblock.local \
    --to=eo@nebensachen.de \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.