aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDidier Verna2013-02-15 18:45:24 -0800
committerGlenn Morris2013-02-15 18:45:24 -0800
commite5b246e9f36efcf667809b22538af3c33fe6d99a (patch)
tree2a330de07d95ea46d357186908d8a0bd551fb0a2
parenta7727d05be4047b4ab6c8218ad2de5e2ad8624da (diff)
downloademacs-e5b246e9f36efcf667809b22538af3c33fe6d99a.tar.gz
emacs-e5b246e9f36efcf667809b22538af3c33fe6d99a.zip
* lisp/net/network-stream.el (network-stream-open-starttls):
Check that response to the starttls-command is non-nil. Fixes: debbugs:13706
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/network-stream.el5
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4a328a749bc..735ddd25369 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-02-16 Didier Verna <didier@didierverna.net>
2
3 * net/network-stream.el (network-stream-open-starttls):
4 Check that response to the starttls-command is non-nil. (Bug#13706)
5
12013-02-14 Glenn Morris <rgm@gnu.org> 62013-02-14 Glenn Morris <rgm@gnu.org>
2 7
3 * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. 8 * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index 8cf9ec67e53..fd21997ba28 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -262,8 +262,9 @@ STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
262 ;; EHLO for SMTP. 262 ;; EHLO for SMTP.
263 (when (plist-get parameters :always-query-capabilities) 263 (when (plist-get parameters :always-query-capabilities)
264 (network-stream-command stream capability-command eo-capa))) 264 (network-stream-command stream capability-command eo-capa)))
265 (when (string-match success-string 265 (when (let ((response
266 (network-stream-command stream starttls-command eoc)) 266 (network-stream-command stream starttls-command eoc)))
267 (and response (string-match success-string response)))
267 ;; The server said it was OK to begin STARTTLS negotiations. 268 ;; The server said it was OK to begin STARTTLS negotiations.
268 (if builtin-starttls 269 (if builtin-starttls
269 (let ((cert (network-stream-certificate host service parameters))) 270 (let ((cert (network-stream-certificate host service parameters)))