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();