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: Mon, 02 May 2011 14:12:55 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87oc3kudag.fsf@lifelogs.com> References: <87ipvwl1nx.wl%claudio.bley@gmail.com> <87lj05svwh.fsf@lifelogs.com> <87bp11imgb.wl%claudio.bley@gmail.com> <8739mc5nes.fsf@lifelogs.com> <87ipuubao6.fsf@lifelogs.com> <87fwpjfkkz.fsf@lifelogs.com> <87bp072fb1.fsf@lifelogs.com> <874o5vimm5.fsf@lifelogs.com> <87zknjmcyk.fsf@lifelogs.com> <87sjta2zvp.fsf@lifelogs.com> <87liyzglkh.fsf@lifelogs.com> <4DB77682.1070605@gmail.com> <8762q04ba1.fsf@lifelogs.com> <87hb9dufao.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1304363717 24623 80.91.229.12 (2 May 2011 19:15:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 May 2011 19:15:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 02 21:15:12 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QGyaO-0006LL-6B for ged-emacs-devel@m.gmane.org; Mon, 02 May 2011 21:15:12 +0200 Original-Received: from localhost ([::1]:44079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGyaN-0006K5-DC for ged-emacs-devel@m.gmane.org; Mon, 02 May 2011 15:15:11 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGyaK-0006IH-Cd for emacs-devel@gnu.org; Mon, 02 May 2011 15:15:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGyaI-0003EZ-Od for emacs-devel@gnu.org; Mon, 02 May 2011 15:15:08 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:50607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGyaI-0003DC-F3 for emacs-devel@gnu.org; Mon, 02 May 2011 15:15:06 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QGyaG-0006Hs-6h for emacs-devel@gnu.org; Mon, 02 May 2011 21:15:04 +0200 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 ; Mon, 02 May 2011 21:15:04 +0200 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 May 2011 21:15:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 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.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:hF2eRit4pmw1VJ1CcQOFJ8OpRoY= 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.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138984 Archived-At: On Mon, 2 May 2011 21:00:40 +0200 Juanma Barranquero wrote: JB> 2011/5/2 Ted Zlatanov : >> All the C GnuTLS init code (currently `gnutls-boot') calls >> `emacs_gnutls_global_init' *every time*, which is short enough to quote >> here: JB> [...] >> So we just need to modify `emacs_gnutls_global_init' to load and check >> the GnuTLS library and return an appropriate error (which can be any >> ELisp number object, so you can attach debug info to it).  Or you can do >> it once at init time, which seems less convenient to the user but less >> work.  I don't have an opinion either way. JB> No, I prefer to do it in emacs_gnutls_global_init, so the .DLLs are JB> loaded on demand. But to avoid repeated attempts in case the library JB> is not present, I'll do as with the image libraries: cache the result. JB> That means that the library must be present the fist time it is used, JB> or it won't be available during the complete run of that Emacs JB> instance. OK with me, just make sure you log it :) >> I think gnutls.el should not know about this.  It should simply get an >> error from the C layer if the library could not be loaded. JB> What if some elisp code wants to know whether GnuTLS is available? JB> (fboundp 'gnutls-whatever) won't do, because the functions are defined JB> (just non-functional). IMO JB> (if (gnutls-available-p) JB> ; do something JB> ; do something else JB> seems cleaner that JB> (condition-case err JB> ; use gnutls JB> (;catch the error)) JB> but it is your call. My hope is that gnutls.el won't be used directly and `open-network-stream' will be used instead, to avoid the mess of starttls/gnutls-cli/openssl special process calls we had before. So this problem is isolated to `open-network-stream' and Lars should decide how he wants to handle it, IMO. If he wants `gnutls-available-p' I'll write it. Ted