]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: fix connection failures with TLS 1.3 and GnuTLS
authorPeter Wu <peter@lekensteyn.nl>
Sun, 20 Oct 2019 17:10:31 +0000 (18:10 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 21 Oct 2019 18:35:05 +0000 (20:35 +0200)
Prefer TLS 1.3 before TLS 1.2 for DNS-over-TLS support, otherwise
servers compliant with RFC 8446 might end up agreeing TLS 1.2 plus a
downgrade signal which is not expected by GnuTLS clients. This manifests
in the following error:

    Failed to invoke gnutls_handshake: An illegal parameter has been received.

Fixes: #13528
Fixes: v242-962-g9c0624dcdb ("resolved: support TLS 1.3 when using GnuTLS for DNS-over-TLS")
src/resolve/resolved-dnstls-gnutls.c

index 06d635fcc444f77302398131a50d660846269965..7ad96620732bc21604268ad84c14024e1618363f 100644 (file)
@@ -10,7 +10,7 @@
 #include "resolved-dnstls.h"
 
 #if GNUTLS_VERSION_NUMBER >= 0x030600
-#define PRIORTY_STRING "NORMAL:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3"
+#define PRIORTY_STRING "NORMAL:-VERS-ALL:+VERS-TLS1.3:+VERS-TLS1.2"
 #else
 #define PRIORTY_STRING "NORMAL:-VERS-ALL:+VERS-TLS1.2"
 #endif