]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/net/network-stream.el (network-stream-open-starttls):
authorDidier Verna <didier@didierverna.net>
Sat, 16 Feb 2013 02:45:24 +0000 (18:45 -0800)
committerGlenn Morris <rgm@gnu.org>
Sat, 16 Feb 2013 02:45:24 +0000 (18:45 -0800)
Check that response to the starttls-command is non-nil.

Fixes: debbugs:13706
lisp/ChangeLog
lisp/net/network-stream.el

index 4a328a749bc7d2f18d5a84d5ffdf9c8a727eaed8..735ddd253698a50a40892d4eb9367a197c87cf35 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-16  Didier Verna  <didier@didierverna.net>
+
+       * net/network-stream.el (network-stream-open-starttls):
+       Check that response to the starttls-command is non-nil.  (Bug#13706)
+
 2013-02-14  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
index 8cf9ec67e53448aadd61dfabc04828c5874e642a..fd21997ba288d8c8d74ac2ab873ccc51d222e44b 100644 (file)
@@ -262,8 +262,9 @@ STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
        ;; EHLO for SMTP.
        (when (plist-get parameters :always-query-capabilities)
          (network-stream-command stream capability-command eo-capa)))
-      (when (string-match success-string
-                         (network-stream-command stream starttls-command eoc))
+      (when (let ((response
+                  (network-stream-command stream starttls-command eoc)))
+             (and response (string-match success-string response)))
        ;; The server said it was OK to begin STARTTLS negotiations.
        (if builtin-starttls
            (let ((cert (network-stream-certificate host service parameters)))