summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-03-19 21:18:19 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-03-20 18:23:55 +0100
commitd41d8297c8e74b8e4b684039c13e86b23cce11ea (patch)
treefca97bffc6463ad34f26355c540e8ee30d23cc14
parentaa5855847c158524ceaa99f2e99fb2eba5b118af (diff)
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 <timur.pocheptsov@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/network/configure.json6
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp6
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();