init-security.el 844 B

1234567891011121314151617181920212223
  1. ;;; init-security.el --- .Emacs Configuration -*- lexical-binding: t -*-
  2. ;;; Commentary:
  3. ;;
  4. ;;; Code:
  5. ;;---------------------------------------------------------------------------------------------
  6. ;; Security. Check https://web.archive.org/web/20170413150436/https://ogbe.net/emacsconfig.html
  7. ;;---------------------------------------------------------------------------------------------
  8. (setq tls-checktrust t)
  9. (setq gnutls-verify-error t)
  10. (let ((trustfile "/etc/ssl/cert.pem"))
  11. (setq tls-program
  12. `(,(format "gnutls-cli --x509cafile %s -p %%p %%h" trustfile)
  13. ,(format "openssl s_client -connect %%h:%%p -CAfile %s -no_ssl2 -ign_eof" trustfile)))
  14. (setq gnutls-trustfiles (list trustfile)))
  15. (provide 'init-security)
  16. ;; Local Variables:
  17. ;; byte-compile-warnings: (not free-vars)
  18. ;; End:
  19. ;;; init-security.el ends here