问题
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?
回答1:
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
.
来源:https://stackoverflow.com/questions/12655232/how-to-ask-gnutls-to-use-client-certificate-in-emacs-24