summaryrefslogtreecommitdiffstats
path: root/src/network/ssl
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-11 01:00:12 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-11 01:00:13 +0100
commita2fd99c430e253ac9c695ffdad635e6882eb910a (patch)
tree475639f056e84b3aeb51bea6c44064ca2f90fa19 /src/network/ssl
parentb688c7e99a8def9db836d1d6ab7388ae14a5d5b0 (diff)
parentd43ac840e5d5a0a2df9e8adce276c956c98be6aa (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/network/ssl')
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index f9e8f01222..01aa06446c 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -866,7 +866,7 @@ static QPair<QLibrary*, QLibrary*> loadOpenSsl()
// reason, we will search a few common paths (see findAllLibSsl() above) in hopes
// we find one that works.
//
- // If that fails, for OpenSSL 1.0 we also try a fallback -- just look up
+ // If that fails, for OpenSSL 1.0 we also try some fallbacks -- look up
// libssl.so with a hardcoded soname. The reason is QTBUG-68156: the binary
// builds of Qt happen (at the time of this writing) on RHEL machines,
// which change SHLIB_VERSION_NUMBER to a non-portable string. When running
@@ -899,14 +899,23 @@ static QPair<QLibrary*, QLibrary*> loadOpenSsl()
}
#if !QT_CONFIG(opensslv11)
- // first-and-half attempt: for OpenSSL 1.0 try to load an hardcoded soname.
- libssl->setFileNameAndVersion(QLatin1String("ssl"), QLatin1String("1.0.0"));
- libcrypto->setFileNameAndVersion(QLatin1String("crypto"), QLatin1String("1.0.0"));
- if (libcrypto->load() && libssl->load()) {
- return pair;
- } else {
- libssl->unload();
- libcrypto->unload();
+ // first-and-half attempts: for OpenSSL 1.0 try to load some hardcoded sonames:
+ // - "1.0.0" is the official upstream one
+ // - "1.0.2" is found on some distributions (e.g. Debian) that patch OpenSSL
+ static const QLatin1String fallbackSonames[] = {
+ QLatin1String("1.0.0"),
+ QLatin1String("1.0.2")
+ };
+
+ for (auto fallbackSoname : fallbackSonames) {
+ libssl->setFileNameAndVersion(QLatin1String("ssl"), fallbackSoname);
+ libcrypto->setFileNameAndVersion(QLatin1String("crypto"), fallbackSoname);
+ if (libcrypto->load() && libssl->load()) {
+ return pair;
+ } else {
+ libssl->unload();
+ libcrypto->unload();
+ }
}
#endif
#endif