How to ask gnutls to use client certificate in ema

2019-05-02 13:24发布

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条回答
疯言疯语
2楼-- · 2019-05-02 13:45

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.

查看更多
登录 后发表回答