From 3186ca3e3972cf46eb48a33fe90063eb112e32b3 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 9 Jul 2021 15:00:19 +0200 Subject: [PATCH] Dont's use DTLS_MAX_VERSION when setting SSL_CTX It was fixed quite some time ago for TLS counterpart (TLS_MAX_VERSION), but somehow the similar fix was missing for DTLS. OpenSSL v3 deprecated those constants and they can be compiled out by OPENSSL_API_COMPAT. Pick-to: 6.2 Task-number: QTBUG-94596 Change-Id: Ia0246170a003db900c430b2fbfc177caf05a395a Reviewed-by: Edward Welbourne --- src/plugins/tls/openssl/qsslcontext_openssl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/tls/openssl/qsslcontext_openssl.cpp b/src/plugins/tls/openssl/qsslcontext_openssl.cpp index dae87374cb..98ed17acf8 100644 --- a/src/plugins/tls/openssl/qsslcontext_openssl.cpp +++ b/src/plugins/tls/openssl/qsslcontext_openssl.cpp @@ -476,7 +476,7 @@ QT_WARNING_DISABLE_DEPRECATED break; case QSsl::DtlsV1_0OrLater: minVersion = DTLS1_VERSION; - maxVersion = DTLS_MAX_VERSION; + maxVersion = 0; break; QT_WARNING_POP case QSsl::DtlsV1_2: @@ -485,7 +485,7 @@ QT_WARNING_POP break; case QSsl::DtlsV1_2OrLater: minVersion = DTLS1_2_VERSION; - maxVersion = DTLS_MAX_VERSION; + maxVersion = 0; break; case QSsl::TlsV1_3OrLater: #ifdef TLS1_3_VERSION