X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Ftls.el;h=48e6a42186ca1ec2318549b074b8e62a76f8057a;hb=94f288135f95ca48fb50f5aa43bc09f9669c5c23;hp=6abb0483d52d849910c95fc9c64a46ca64effc61;hpb=3314c2192d8b63288799e33168699e49d1c947dd;p=gnus diff --git a/lisp/tls.el b/lisp/tls.el index 6abb0483d..48e6a4218 100644 --- a/lisp/tls.el +++ b/lisp/tls.el @@ -1,6 +1,6 @@ ;;; tls.el --- TLS/SSL support via wrapper around GnuTLS -;; Copyright (C) 1996-1999, 2002-2014 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2002-2015 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; Keywords: comm, tls, gnutls, ssl @@ -137,7 +137,7 @@ the external program knows about the root certificates you consider trustworthy, e.g.: \(setq tls-program - '(\"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h\" + \\='(\"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h\" \"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3\" \"openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof\"))" :type '(choice (const :tag "Always" t) @@ -174,6 +174,11 @@ Used by `tls-certificate-information'." :type 'string :group 'tls) +(defalias 'tls-format-message + (if (fboundp 'format-message) 'format-message + ;; for Emacs < 25, and XEmacs, don't worry about quote translation. + 'format)) + (defun tls-certificate-information (der) "Parse X.509 certificate in DER format into an assoc list." (let ((certificate (concat "-----BEGIN CERTIFICATE-----\n" @@ -275,8 +280,8 @@ Fourth arg PORT is an integer specifying a port to connect to." (message "The certificate presented by `%s' is \ NOT trusted." host)) (not (yes-or-no-p - (format "The certificate presented by `%s' is \ -NOT trusted. Accept anyway? " host))))) + (tls-format-message "\ +The certificate presented by `%s' is NOT trusted. Accept anyway? " host))))) (and tls-hostmismatch (save-excursion (goto-char (point-min))