1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Prefer tls to ssl in nnimap and smtpmail code

* lisp/gnus/nnimap.el (nnimap-open-connection): Use 'tls.
(nnimap-open-connection-1): Check 'tls before 'ssl.
* lisp/mail/smtpmail.el (smtpmail-stream-type): Add 'ssl to
allowed values, state 'tls is preferred.
This commit is contained in:
Robert Pluim 2025-08-04 17:40:04 +02:00
parent 62e0cde967
commit 972e4f4a7f
2 changed files with 10 additions and 6 deletions

View file

@ -448,13 +448,14 @@ during splitting, which may be slow."
(defun nnimap-open-connection (buffer) (defun nnimap-open-connection (buffer)
;; Be backwards-compatible -- the earlier value of nnimap-stream was ;; Be backwards-compatible -- the earlier value of nnimap-stream was
;; `ssl' when nnimap-server-port was nil. Sort of. ;; `ssl' when nnimap-server-port was nil. Sort of. But it's `tls'
;; now, because we're post the Great 2025 Spelling Reform.
(when (and nnimap-server-port (when (and nnimap-server-port
(eq nnimap-stream 'undecided)) (eq nnimap-stream 'undecided))
(setq nnimap-stream 'ssl)) (setq nnimap-stream 'tls))
(let ((stream (let ((stream
(if (eq nnimap-stream 'undecided) (if (eq nnimap-stream 'undecided)
(cl-loop for type in '(ssl network) (cl-loop for type in '(tls network)
for stream = (let ((nnimap-stream type)) for stream = (let ((nnimap-stream type))
(nnimap-open-connection-1 buffer)) (nnimap-open-connection-1 buffer))
while (eq stream 'no-connect) while (eq stream 'no-connect)
@ -493,7 +494,7 @@ during splitting, which may be slow."
(nnheader-message 7 "Opening connection to %s via shell..." (nnheader-message 7 "Opening connection to %s via shell..."
nnimap-address) nnimap-address)
'("imap")) '("imap"))
((memq nnimap-stream '(ssl tls)) ((memq nnimap-stream '(tls ssl))
(nnheader-message 7 "Opening connection to %s via tls..." (nnheader-message 7 "Opening connection to %s via tls..."
nnimap-address) nnimap-address)
'("imaps" "imap" "993" "143")) '("imaps" "imap" "993" "143"))

View file

@ -99,12 +99,15 @@ don't define this value."
"Type of SMTP connections to use. "Type of SMTP connections to use.
This may be either nil (upgrade with STARTTLS if possible), This may be either nil (upgrade with STARTTLS if possible),
`starttls' (refuse to send if STARTTLS isn't available), `starttls' (refuse to send if STARTTLS isn't available),
`plain' (never use STARTTLS), or `ssl' (to use TLS/SSL)." `plain' (never use STARTTLS), or `tls' (to use TLS/SSL).
`ssl' is accepted as a backwards-compatible equivalent
to `tls'"
:version "24.1" :version "24.1"
:type '(choice (const :tag "Possibly upgrade to STARTTLS" nil) :type '(choice (const :tag "Possibly upgrade to STARTTLS" nil)
(const :tag "Always use STARTTLS" starttls) (const :tag "Always use STARTTLS" starttls)
(const :tag "Never use STARTTLS" plain) (const :tag "Never use STARTTLS" plain)
(const :tag "Use TLS/SSL" ssl))) (const :tag "Use TLS/SSL" tls)
(const :tag "Use TLS/SSL (old name)" ssl)))
(defcustom smtpmail-sendto-domain nil (defcustom smtpmail-sendto-domain nil
"Local domain name without a host name. "Local domain name without a host name.