From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] GnuTLS support on Woe32 Date: Tue, 22 Mar 2011 21:20:21 -0400 Message-ID: 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> <87wrjquacf.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300892402 28757 80.91.229.12 (23 Mar 2011 15:00:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2011 15:00:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 15:59:58 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 1Q2PXR-0006dt-MN for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2011 15:59:57 +0100 Original-Received: from localhost ([127.0.0.1]:40464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2PXQ-0002tN-Mb for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2011 10:59:56 -0400 Original-Received: from [140.186.70.92] (port=54503 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2PXE-0002rq-Ai for emacs-devel@gnu.org; Wed, 23 Mar 2011 10:59:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2PXC-0007Aq-LT for emacs-devel@gnu.org; Wed, 23 Mar 2011 10:59:44 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:38995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2PXC-0007AX-Eo for emacs-devel@gnu.org; Wed, 23 Mar 2011 10:59:42 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p2NF0m0I005061; Wed, 23 Mar 2011 11:00:48 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id D661D660F8; Tue, 22 Mar 2011 21:20:21 -0400 (EDT) In-Reply-To: <87wrjquacf.fsf@lifelogs.com> (Ted Zlatanov's message of "Tue, 22 Mar 2011 16:14:08 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.5 X-NAI-Spam-Rules: 2 Rules triggered DATE_IN_PAST_12_24=0.5, RV3805=0 X-NAI-Spam-Version: 2.2.0.9286 : core <3805> : streams <612060> : uri <833408> X-NAI-Spam-Level: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:137572 Archived-At: > Because of the way SSL and TLS work, the connection may start out > unencrypted and the upgrade is sort of opportunistic. So we don't know > in advance if we'll need the `gnutls-hostname'. I must be missing something: the code seems to read `gnutls-hostname' right after reading the keyword arguments, so it behaves just like a keyword argument AFAICT. And the caller of gnutls-boot seems to set it just before calling gnutls-negotiate/gnutls-boot so it seems that from the caller's POV it could also be replaced by an additional argument to gnutls-boot/negotiate. > Also the `gnutls-hostname' is not necessarily the actual host we > connect to, so we can't keep it as a per-process property. I don't see how the "so" above connects the two parts of the sentence. Then again, I still don't know what `gnutls-hostname' stands for so I'm largely talking about something I don't understand. > And finally, making it a keyword parameter means the piece that > *upgrades* the connection to TLS has to know the original hostname of > the connection. I thought it was cleaner to separate them, so > upgrading a connection is easier to do opportunistically. Sounds reasonable. > Emacs doesn't have per-process variables at the ELisp level so I had to > associate it with the buffer and making it buffer-local seemed > sensible. How would you do it? Not sure what you mean. Don't process-put/get provide per-process "variables"? Also, rather than a buffer-local variable, why not use a let-bound variable instead? > (there's no `declare-variable'). Of course there is: it's called (defvar ). > Sorry this patch is getting so large. I'll try to fix all the issues > ASAP. We need Claudio Bley's papers too, right? I don't know, I haven't tracked what comes from where. Stefan