From 4cc631aaa701b21c1dc3b2506b154b2bba0cbaef Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 10 Apr 2020 23:41:27 -0400 Subject: [PATCH] Fix #2816: disable TLS 1.3 on windows Windows is a lost cause. --- core/core.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/core.el b/core/core.el index 94739aafd..eec32a36d 100644 --- a/core/core.el +++ b/core/core.el @@ -191,9 +191,12 @@ users).") ;; least a little more discerning. (setq gnutls-verify-error (not (getenv "INSECURE")) gnutls-algorithm-priority - (concat "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2" - (if (ignore-errors (>= libgnutls-version 30605)) - ":+VERS-TLS1.3")) + (when (boundp 'libgnutls-version) + (concat "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2" + (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