From d41d8297c8e74b8e4b684039c13e86b23cce11ea Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 19 Mar 2020 21:18:19 +0100 Subject: [PATCH] OpenSSL: bump the minimum supported version to 1.1.1 We don't support 1.0 any more, and 1.1.0 has reached EOL. Bump to 1.1.1 so we can freely use its APIs. [ChangeLog][QtNetwork][SSL] The minimum required version of OpenSSL is now 1.1.1. Change-Id: I5cfb6672fadfa48aedaefbcd6a954aa9eb85bfa5 Reviewed-by: Timur Pocheptsov Reviewed-by: Lars Knoll --- src/network/configure.json | 6 +++--- src/network/ssl/qsslsocket_openssl.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/network/configure.json b/src/network/configure.json index d3e5009f45..289d84fbb4 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -61,11 +61,11 @@ "export": "openssl", "test": { "tail": [ - "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L", - "# error OpenSSL >= 1.1.0 is required", + "#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10101000L", + "# error OpenSSL >= 1.1.1 is required", "#endif", "#if !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)", - "# error OpenSSL was reported as >= 1.1.0 but is missing required features, possibly it's libressl which is unsupported", + "# error OpenSSL was reported as >= 1.1.1 but is missing required features, possibly it's libressl which is unsupported", "#endif" ] }, diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index e197ce6515..9b28d52e21 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -1942,6 +1942,12 @@ bool QSslSocketPrivate::ensureLibraryLoaded() // Initialize OpenSSL. if (q_OPENSSL_init_ssl(0, nullptr) != 1) return false; + + if (q_OpenSSL_version_num() < 0x10101000L) { + qCWarning(lcSsl, "QSslSocket: OpenSSL >= 1.1.1 is required; %s was found instead", q_OpenSSL_version(OPENSSL_VERSION)); + return false; + } + q_SSL_load_error_strings(); q_OpenSSL_add_all_algorithms();