GNU bug report logs - #24422
Proposal to create `sieve-manage-ignore-broken-tls' option

Previous Next

Package: emacs;

Reported by: TSUCHIYA Masatoshi <tsuchiya <at> namazu.org>

Date: Mon, 12 Sep 2016 20:03:02 UTC

Severity: minor

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: TSUCHIYA Masatoshi <tsuchiya <at> namazu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Proposal to create `sieve-manage-ignore-broken-tls' option
Date: Mon, 12 Sep 2016 15:57:24 -0400
[Message part 1 (text/plain, inline)]
Hi,

When accessing a managesieve server which provides broken TLS
connections, it is quite useful that sieve-manage-open-server() ignores
STARTTLS capability.  Therefore, I propose the following patch.

Regards,

-- 
TSUCHIYA Masatoshi
[Message part 2 (text/x-diff, inline)]
--- a/lisp/sieve-manage.el
+++ b/lisp/sieve-manage.el
@@ -147,6 +147,11 @@ for doing the actual authentication."
   :type 'symbol
   :group 'sieve-manage)
 
+(defcustom sieve-manage-ignore-broken-tls nil
+  "Ignore STARTTLS even if STARTTLS capability is provided."
+  :type 'boolean
+  :group 'sieve-manage)
+
 ;; Internal variables:
 
 (defconst sieve-manage-local-variables '(sieve-manage-server
@@ -211,14 +216,16 @@ Return the buffer associated with the connection."
          :return-list t
          :starttls-function
          (lambda (capabilities)
-           (when (string-match "\\bSTARTTLS\\b" capabilities)
-             "STARTTLS\r\n")))
+	   (when (and (not sieve-manage-ignore-broken-tls)
+		      (string-match "\\bSTARTTLS\\b" capabilities))
+	     "STARTTLS\r\n")))
       (setq sieve-manage-process proc)
       (setq sieve-manage-capability
             (sieve-manage-parse-capability (plist-get props :capabilities)))
       ;; Ignore new capabilities issues after successful STARTTLS
-      (when (and (memq stream '(nil network starttls))
-                 (eq (plist-get props :type) 'tls))
+      (when (or sieve-manage-ignore-broken-tls
+		(and (memq stream '(nil network starttls))
+		     (eq (plist-get props :type) 'tls)))
         (sieve-manage-drop-next-answer))
       (current-buffer))))
 
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 8 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.