From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] GnuTLS support on Woe32 Date: Tue, 22 Mar 2011 12:57:15 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87d3ljujgk.fsf@lifelogs.com> References: <87ipvwl1nx.wl%claudio.bley@gmail.com> <83oc5ogp89.fsf@gnu.org> <87ipvuwslp.wl%claudio.bley@gmail.com> <87hbbc0zi6.wl%claudio.bley@gmail.com> <83oc5gsdwc.fsf@gnu.org> <87ei6bunxz.wl%claudio.bley@gmail.com> <83tyf6rhgn.fsf@gnu.org> <84zkoy6tah.wl%claudio.bley@gmail.com> <87hbb5a4xq.fsf@lifelogs.com> <84ipvkx1da.wl%claudio.bley@gmail.com> <87d3ls7n3b.fsf@lifelogs.com> <87vczdwjuk.wl%claudio.bley@gmail.com> <87k4fr3koi.fsf@lifelogs.com> <87aagn2tpr.fsf@lifelogs.com> <87lj07umkl.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1300816674 10520 80.91.229.12 (22 Mar 2011 17:57:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2011 17:57:54 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 22 18:57:50 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q25q2-0004LW-L3 for ged-emacs-devel@m.gmane.org; Tue, 22 Mar 2011 18:57:50 +0100 Original-Received: from localhost ([127.0.0.1]:41174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q25q2-0004Pw-3f for ged-emacs-devel@m.gmane.org; Tue, 22 Mar 2011 13:57:50 -0400 Original-Received: from [140.186.70.92] (port=56725 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q25pt-0004AY-7g for emacs-devel@gnu.org; Tue, 22 Mar 2011 13:57:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q25ps-0006jn-1L for emacs-devel@gnu.org; Tue, 22 Mar 2011 13:57:41 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:47310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q25pr-0006jh-Mr for emacs-devel@gnu.org; Tue, 22 Mar 2011 13:57:39 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q25pl-0004Bp-7J for emacs-devel@gnu.org; Tue, 22 Mar 2011 18:57:33 +0100 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Mar 2011 18:57:33 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Mar 2011 18:57:33 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 61 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Za6jhAKVonEX5AJ4SBDFQLV9LMw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137533 Archived-At: --=-=-= Content-Type: text/plain On Tue, 22 Mar 2011 18:12:11 +0100 Robert Pluim wrote: RP> Ted Zlatanov writes: >> On Tue, 22 Mar 2011 17:19:22 +0100 Robert Pluim wrote: >> RP> Ted Zlatanov writes: >>>> I've attached an updated patch. Sorry if I have missed anything. It >>>> would be nice to have an automatic way to catch these formatting issues. >> RP> Does gnus require a change as well? >> >> Yes, it will have to set the `gnutls-hostname'. This should be >> transparent to the user, probably in proto-stream.el. I can look at it >> once the patch is approved. RP> Well, gnus is my testcase for TLS, so I can't weigh in on that at all :) Try the attached patch against proto-stream.el in the Emacs trunk. I'll refresh my patch to add this change too. Thanks Ted --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=callbacks-proto.patch === modified file 'lisp/gnus/proto-stream.el' --- lisp/gnus/proto-stream.el 2011-02-06 22:27:28 +0000 +++ lisp/gnus/proto-stream.el 2011-03-22 17:55:28 +0000 @@ -61,7 +61,8 @@ :group 'comm) (declare-function gnutls-negotiate "gnutls" - (proc type &optional priority-string trustfiles keyfiles)) + (proc type &optional priority-string trustfiles keyfiles + verify-flags verify-error verify-hostname-error)) ;;;###autoload (defun open-protocol-stream (name buffer host service &rest parameters) @@ -190,7 +191,12 @@ (list stream greeting capabilities 'network))) ;; The server said it was OK to start doing STARTTLS negotiations. (if (fboundp 'open-gnutls-stream) - (gnutls-negotiate stream nil) + (progn + ;; Set the required buffer-local gnutls-hostname + ;; (defined in gnutls.el). + (with-current-buffer buffer + (set (intern "gnutls-hostname") host)) + (gnutls-negotiate stream nil)) (unless (starttls-negotiate stream) (delete-process stream) (setq stream nil))) --=-=-=--