[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105016: Work around gnutls failures
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105016: Work around gnutls failures |
Date: |
Thu, 07 Jul 2011 17:14:17 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105016
fixes bug(s): http://debbugs.gnu.org/9017
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Thu 2011-07-07 17:14:17 +0200
message:
Work around gnutls failures
* net/network-stream.el (network-stream-open-starttls): If gnutls
negotiation fails, then possibly try again with a non-encrypted
connection.
modified:
lisp/ChangeLog
lisp/net/network-stream.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-07-07 14:54:12 +0000
+++ b/lisp/ChangeLog 2011-07-07 15:14:17 +0000
@@ -1,5 +1,9 @@
2011-07-07 Lars Magne Ingebrigtsen <address@hidden>
+ * net/network-stream.el (network-stream-open-starttls): If gnutls
+ negotiation fails, then possibly try again with a non-encrypted
+ connection (bug#9017).
+
* mail/smtpmail.el (smtpmail-stream-type): Note that `plain' can
be used.
=== modified file 'lisp/net/network-stream.el'
--- a/lisp/net/network-stream.el 2011-07-06 15:09:11 +0000
+++ b/lisp/net/network-stream.el 2011-07-07 15:14:17 +0000
@@ -263,8 +263,16 @@
;; The server said it was OK to begin STARTTLS negotiations.
(if builtin-starttls
(let ((cert (network-stream-certificate host service parameters)))
- (gnutls-negotiate :process stream :hostname host
- :keylist (and cert (list cert))))
+ (condition-case nil
+ (gnutls-negotiate :process stream :hostname host
+ :keylist (and cert (list cert)))
+ ;; If we get a gnutls-specific error (for instance if
+ ;; the certificate the server gives us is completely
+ ;; syntactically invalid), then close the connection
+ ;; and possibly (further down) try to create a
+ ;; non-encrypted connection.
+ (gnutls-error
+ (delete-process stream))))
(unless (starttls-negotiate stream)
(delete-process stream)))
(if (memq (process-status stream) '(open run))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105016: Work around gnutls failures,
Lars Magne Ingebrigtsen <=