How to ask gnutls to use client certificate in emacs 24

别等时光非礼了梦想. 提交于 2019-12-07 05:25:25

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!