emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] GnuTLS support on Woe32


From: Ted Zlatanov
Subject: Re: [PATCH] GnuTLS support on Woe32
Date: Mon, 02 May 2011 14:12:55 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Mon, 2 May 2011 21:00:40 +0200 Juanma Barranquero <address@hidden> wrote: 

JB> 2011/5/2 Ted Zlatanov <address@hidden>:
>> 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




reply via email to

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