[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106092: * net/network-stream.el (net
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106092: * net/network-stream.el (network-stream-open-starttls): Improve failure detection |
Date: |
Sat, 15 Oct 2011 12:57:38 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106092
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-10-15 12:57:38 -0400
message:
* net/network-stream.el (network-stream-open-starttls): Improve failure
detection
for lack of TLS capability.
modified:
lisp/ChangeLog
lisp/net/network-stream.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-10-15 16:35:19 +0000
+++ b/lisp/ChangeLog 2011-10-15 16:57:38 +0000
@@ -1,5 +1,8 @@
2011-10-15 Chong Yidong <address@hidden>
+ * net/network-stream.el (network-stream-open-starttls): Improve
+ detection of failure due to lack of TLS support.
+
* mail/sendmail.el (sendmail-query-once): Tweak prompt message,
putting the input text in front and in bold.
=== modified file 'lisp/net/network-stream.el'
--- a/lisp/net/network-stream.el 2011-08-17 20:50:33 +0000
+++ b/lisp/net/network-stream.el 2011-10-15 16:57:38 +0000
@@ -218,7 +218,7 @@
(resulting-type 'plain)
(builtin-starttls (and (fboundp 'gnutls-available-p)
(gnutls-available-p)))
- starttls-command error)
+ starttls-available starttls-command error)
;; First check whether the server supports STARTTLS at all.
(when (and capabilities success-string starttls-function)
@@ -227,10 +227,11 @@
;; If we have built-in STARTTLS support, try to upgrade the
;; connection.
(when (and starttls-command
- (or builtin-starttls
- (and (or require-tls
- (plist-get parameters :use-starttls-if-possible))
- (starttls-available-p)))
+ (setq starttls-available
+ (or builtin-starttls
+ (and (or require-tls
+ (plist-get parameters
:use-starttls-if-possible))
+ (starttls-available-p))))
(not (eq (plist-get parameters :type) 'plain)))
;; If using external STARTTLS, drop this connection and start
;; anew with `starttls-open-stream'.
@@ -298,9 +299,13 @@
;; support, or no gnutls-cli installed.
(eq resulting-type 'plain))
(setq error
- (if require-tls
+ (if starttls-available
"Server does not support TLS"
- "Server supports STARTTLS, but Emacs does not have support for
it"))
+ (concat "Emacs does not support TLS, and no external `"
+ (if starttls-use-gnutls
+ starttls-gnutls-program
+ starttls-program)
+ "' program was found")))
(delete-process stream)
(setq stream nil))
;; Return value:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106092: * net/network-stream.el (network-stream-open-starttls): Improve failure detection,
Chong Yidong <=