Fix #2816: disable TLS 1.3 on windows

Windows is a lost cause.
This commit is contained in:
Henrik Lissner 2020-04-10 23:41:27 -04:00
parent 3ef8ff9172
commit 4cc631aaa7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -191,9 +191,12 @@ users).")
;; least a little more discerning.
(setq gnutls-verify-error (not (getenv "INSECURE"))
gnutls-algorithm-priority
(when (boundp 'libgnutls-version)
(concat "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2"
(if (ignore-errors (>= libgnutls-version 30605))
":+VERS-TLS1.3"))
(if (and (not IS-WINDOWS)
(not (version< emacs-version "26.3"))
(>= libgnutls-version 30605))
":+VERS-TLS1.3")))
;; `gnutls-min-prime-bits' is set based on recommendations from
;; https://www.keylength.com/en/4/
gnutls-min-prime-bits 3072