need help adding GnuTLS support to Emacs

Ted Zlatanov tzz at lifelogs.com
Sun Aug 8 06:20:29 CEST 2010


I started with 

http://josefsson.org/securemacs/emacs-21-ssl-4.patch

ending with the attached patch (against the latest Bazaar update of
Emacs).  It's pretty hard for me to know if my changes are sensible
because my GnuTLS knowledge is very limited.  So far I have the
configure.in and Makefile.in changes working (I had to directly add
'-I/usr/include/gnutls' on my Ubuntu system because pkg-config didn't
have the correct cflags).  I use PKG_CHECK_MODULES and ask for GnuTLS
2.2.4 or newer (assuming the earliest version on the FTP site as of
today is acceptable).

The process.c changes are definitely wrong because the following
functions are missing:

process.c:7141: warning: implicit declaration of function ‘gnutls_x509pki_set_client_key_file’
process.c:7174: warning: implicit declaration of function ‘gnutls_x509pki_set_client_trust_file’
process.c:7233: warning: implicit declaration of function ‘gnutls_anon_set_client_dh_params’
process.c:7271: warning: implicit declaration of function ‘gnutls_crd_allocate_client_credentials’

and they may be incorrect in these places:

process.c:7348: warning: passing argument 2 of ‘gnutls_transport_set_ptr’ makes pointer from integer without a cast
/usr/include/gnutls/gnutls.h:894: note: expected ‘gnutls_transport_ptr_t’ but argument is of type ‘int’
process.c:7381: warning: passing argument 2 of ‘gnutls_transport_set_ptr’ makes pointer from integer without a cast
/usr/include/gnutls/gnutls.h:894: note: expected ‘gnutls_transport_ptr_t’ but argument is of type ‘int’

I changed many of the type names in the patch according to my
understanding of gnutls.h.  It's very possible I made mistakes along the
way.

I would appreciate it if someone experienced with GnuTLS took the time
to review the patch.  At this point the changes are all in the source
code and should not involve touching the Emacs internals.  I think,
outside of the problems noted above, that I followed the original patch
closely, but it's been many years since it was written so there may be
overarching design issues with it as well.

Thanks for your help
Ted

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tls.patch
Type: text/x-diff
Size: 24812 bytes
Desc: not available
URL: </pipermail/attachments/20100807/192634f4/attachment.patch>


More information about the Gnutls-devel mailing list