need help adding GnuTLS support to Emacs

Simon Josefsson simon at
Sat Aug 14 01:53:02 CEST 2010

Ted Zlatanov <tzz at> writes:

> On Mon, 9 Aug 2010 08:51:27 +0200 Andreas Metzler <ametzler at> wrote: 
> AM> I am pretty sure this wrong. You should simply use "#include
> AM> <gnutls/gnutls.h>" instead of "#include <gnutls.h>". That is what
> AM> gnutls/doc/examples/* is doing.
> Thanks for your advice.  Attached is a revised version of the patch,
> rebased against today's Emacs.

Nice work!

It reminds me of the fun I had with similar ideas some time ago... see

> +DEFUN ("gnutls-global-init", Fgnutls_global_init, 

Do you really want to expose this function to elisp?  It is
thread-unsafe.  It makes more sense if Emacs initialized the GnuTLS
library on startup instead.

> +DEFUN ("gnutls-protocol-set-priority", Fgnutls_protocol_set_priority, 
> +DEFUN ("gnutls-cipher-set-priority", Fgnutls_cipher_set_priority, 
> +DEFUN ("gnutls-compression-set-priority", Fgnutls_compression_set_priority, 

Don't expose these deprecated APIs, instead just expose a
gnutls-set-priority interface that takes a priority string.  It should
be possible to specify all protocol/cipher/compression/MAC/etc variants
using one simple string.


More information about the Gnutls-devel mailing list