]> git.eshelyaron.com Git - emacs.git/commitdiff
Make STARTTLS error messages better
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 24 Apr 2016 13:39:44 +0000 (15:39 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 24 Apr 2016 13:39:44 +0000 (15:39 +0200)
* lisp/net/network-stream.el (network-stream-open-starttls):
Output a better error message when TLS negotiation fails while
doing STARTTLS (bug#23027).

lisp/net/network-stream.el

index 5ddaef58a899e930f4cabff3094b7801a2c3c02a..c2845d96a5db788319a60e63b84fc2e6097a5c56 100644 (file)
@@ -312,6 +312,9 @@ gnutls-boot (as returned by `gnutls-boot-parameters')."
                                        :host (puny-encode-domain host)
                                         :service service))
            (network-stream-get-response stream start eoc)))
+        (unless (process-live-p stream)
+          (error "Unable to negotiate a TLS connection with %s/%s"
+                 host service))
        ;; Re-get the capabilities, which may have now changed.
        (setq capabilities
              (network-stream-command stream capability-command eo-capa))))