Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ask gnutls to use client certificate in emacs 24

Tags:

emacs

ssl

emacs24

I'm trying to use client certificate to authenticate to an irc server. In emacs 23, I was able to use tls-program variable to do so:

(setq tls-program '("gnutls-cli --priority secure256 --x509cafile /home/me/CAs.pem --x509certfile /home/me/nick.pem -p %p %h"))

However, the support in emacs24 is native using libgnutls and does not use external program, hence it ignores tls-program variable.

Could someone tell me, what's the alternative way to define a default client certificate in emacs 24?

like image 626
Syed Lavasani Avatar asked Oct 07 '22 11:10

Syed Lavasani


1 Answers

The only option I've found out is not to use the built-in GnuTLS support by redefining gnutls-available-p. E.g.:

(defun gnutls-available-p ()
  "Function redefined in order not to use built-in GnuTLS support"
  nil)

Your settings using tls-program will then work as they did before switching to Emacs 24. There is no other way to specify client certificates for now. The only relevant available setting for the built-in gnutls library seems to be gnutls-trustfiles.

like image 193
nert Avatar answered Oct 09 '22 01:10

nert