Only do opportunistic STARTTLS upgrades if we have built-in gnutls support.
[gnus] / lisp / proto-stream.el
index 45cc974..0a055d0 100644 (file)
@@ -160,9 +160,11 @@ PARAMETERS should be a sequence of keywords and values:
         (resulting-type 'plain)
         starttls-command)
 
-    ;; If we have STARTTLS support, try to upgrade the connection.
+    ;; If we have built-in STARTTLS support, try to upgrade the
+    ;; connection.
     (when (and (or (fboundp 'open-gnutls-stream)
-                  (executable-find "gnutls-cli"))
+                  (and require-tls
+                       (executable-find "gnutls-cli")))
               capabilities success-string starttls-function
               (setq starttls-command
                     (funcall starttls-function capabilities)))