summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl/shared
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network/ssl/shared')
-rw-r--r--tests/auto/network/ssl/shared/qopenssl_symbols.h15
-rw-r--r--tests/auto/network/ssl/shared/tlshelpers.h7
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/auto/network/ssl/shared/qopenssl_symbols.h b/tests/auto/network/ssl/shared/qopenssl_symbols.h
index dff5bc8163..c98e90d424 100644
--- a/tests/auto/network/ssl/shared/qopenssl_symbols.h
+++ b/tests/auto/network/ssl/shared/qopenssl_symbols.h
@@ -1,6 +1,6 @@
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2014 BlackBerry Limited. All rights reserved.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
/****************************************************************************
**
@@ -481,7 +481,7 @@ QStringList findAllLibs(QLatin1String filter)
QStringList entryList = dir.entryList(filters, QDir::Files);
std::sort(entryList.begin(), entryList.end(), LibGreaterThan());
- for (const QString &entry : qAsConst(entryList))
+ for (const QString &entry : std::as_const(entryList))
found << path + QLatin1Char('/') + entry;
}
@@ -502,6 +502,12 @@ QStringList findAllLibCrypto()
#ifdef Q_OS_WIN
+#if (OPENSSL_VERSION_NUMBER >> 28) < 3
+#define QT_OPENSSL_VERSION "1_1"
+#elif OPENSSL_VERSION_MAJOR == 3 // Starting with 3.0 this define is available
+#define QT_OPENSSL_VERSION "3"
+#endif // > 3 intentionally left undefined
+
struct LoadedOpenSsl {
std::unique_ptr<QSystemLibrary> ssl, crypto;
};
@@ -540,8 +546,9 @@ static LoadedOpenSsl loadOpenSsl()
#define QT_SSL_SUFFIX
#endif
- tryToLoadOpenSslWin32Library(QLatin1String("libssl-1_1" QT_SSL_SUFFIX),
- QLatin1String("libcrypto-1_1" QT_SSL_SUFFIX), result);
+ tryToLoadOpenSslWin32Library(QLatin1String("libssl-" QT_OPENSSL_VERSION QT_SSL_SUFFIX),
+ QLatin1String("libcrypto-" QT_OPENSSL_VERSION QT_SSL_SUFFIX),
+ result);
#undef QT_SSL_SUFFIX
return result;
diff --git a/tests/auto/network/ssl/shared/tlshelpers.h b/tests/auto/network/ssl/shared/tlshelpers.h
index aa5f2c3c58..de3c2ea51a 100644
--- a/tests/auto/network/ssl/shared/tlshelpers.h
+++ b/tests/auto/network/ssl/shared/tlshelpers.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtNetwork/qtnetworkglobal.h>
@@ -12,13 +12,8 @@
#include <QtCore/qstring.h>
#include <QtCore/qglobal.h>
-// TODO: these 'helpers' later to include OpenSSL resolver/sumbols
-// required by some auto-tests.
-
QT_BEGIN_NAMESPACE
-
-
namespace TlsAux {
inline bool classImplemented(QSsl::ImplementedClass cl)