Force starttls.el to use gnutls-cli, since that what we've checked for.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 28 Nov 2010 02:28:26 +0000 (03:28 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 28 Nov 2010 02:28:26 +0000 (03:28 +0100)
lisp/ChangeLog
lisp/proto-stream.el

index c246461..83930a3 100644 (file)
@@ -2,6 +2,8 @@
 
        * proto-stream.el (proto-stream-open-network): When doing opportunistic
        TLS upgrades we don't really care about the identity of the peer.
+       (proto-stream-open-network): Force starttls.el to use gnutls-cli, since
+       that what we've checked for.
 
        * nntp.el (nntp-open-connection): Report what the connection error is.
 
index d3c373d..eb112ae 100644 (file)
@@ -135,14 +135,14 @@ command to switch on STARTTLS otherwise."
              (executable-find "gnutls-cli"))
          (unless (fboundp 'open-gnutls-stream)
            (delete-process stream)
-           (let ((starttls-extra-arguments
-                  (if (and starttls-use-gnutls
-                           (not (eq type 'starttls)))
-                      ;; When doing opportunistic TLS upgrades we
-                      ;; don't really care about the identity of the
-                      ;; peer.
-                      (cons "--insecure" starttls-extra-arguments)
-                    starttls-extra-arguments)))
+           (let* ((starttls-use-gnutls t)
+                  (starttls-extra-arguments
+                   (if (eq type 'starttls)
+                       ;; When doing opportunistic TLS upgrades we
+                       ;; don't really care about the identity of the
+                       ;; peer.
+                       (cons "--insecure" starttls-extra-arguments)
+                     starttls-extra-arguments)))
              (setq stream (starttls-open-stream name buffer host service)))
            (proto-stream-get-response stream start eoc))
          (proto-stream-command stream starttls-command eoc)