Subject: Re: bug#37221: 27.0.50; gnus fails to open connection post-NSM update

From: Robert Pluim <[email-masked]>
Date: Wed, 04 Sep 2019 21:30:00 +0200

>>>>> On Wed, 04 Sep 2019 19:24:28 +0200, Lars Ingebrigtsen <[email-masked]> said:

    Lars> Robert Pluim <[email-masked]> writes:
    >> Even when the user has said '(nnimap-stream plain)'? Thatʼs a very
    >> explicit request not to do STARTTLS.

    Lars> Let's see...

    Lars> 	      (open-network-stream
    Lars> 	       "*nnimap*" (current-buffer) nnimap-address
    Lars> 	       (nnimap-map-port (car ports))
    Lars> 	       :type nnimap-stream
    Lars> 	       :warn-unless-encrypted t

    Lars> So it should always warn, no matter what the type is.  Here's the call
    Lars> back to the NSM:

    Lars> (defun network-stream-open-plain (name buffer host service parameters)

    Lars> [...]

    Lars>     (when (plist-get parameters :warn-unless-encrypted)
    Lars>       (setq stream (nsm-verify-connection stream host service nil t)))

OK. In that case perhaps I should push the following:

>From 2972228d4761a1bf5682dfd361c5f916704c9222 Mon Sep 17 00:00:00 2001
From: Robert Pluim <[email-masked]>
Date: Thu, 31 Jan 2019 14:25:32 +0100
Subject: [PATCH] Make sure nntp connections always use TLS
To: [email-masked]

---
 lisp/gnus/nntp.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index 49aa6ab144..09512488fb 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -1263,6 +1263,7 @@ nntp-open-connection
 		     :type (cadr (assoc nntp-open-connection-function map))
 		     :end-of-command "^\\([2345]\\|[.]\\).*\n"
 		     :capability-command "HELP\r\n"
+                     :warn-unless-encrypted t
 		     :success "^3"
 		     :starttls-function
 		     (lambda (capabilities)
-- 
2.23.0