diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-09-09 08:37:54 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-09-14 10:24:59 +0200 |
commit | 9bd8b6974dc4d41b205de2ed7e424624d91c569a (patch) | |
tree | 29c3ed9414eec97999674dc62c24a4f3c618ce10 /tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | |
parent | a28fa432f022abad9605f258ecde1d86a2ef2071 (diff) |
QSsl: workaround a 'very secure' OpenSSL version (CentOS 8.x et al)
CentOS it seems not only backported some OpenSSL 3 functions,
but also raised the default security level to 2, making some of
our keys (and MDs?) 'too weak' and failing auto-tests here and
there as a result. For our auto-test we lower the level to 1,
as it is expected to be.
Fixes: QTBUG-86336
Change-Id: I7062a1b292e8b60eb9c2b2e82bd002f09f9da603
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 605d2163f1dcd7e1ad701ade913cb476b91865b1)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp')
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 058b28f04e..3d4a094c43 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -104,6 +104,12 @@ Q_DECLARE_METATYPE(QNetworkProxyQuery) typedef QSharedPointer<QNetworkReply> QNetworkReplyPtr; +#ifndef QT_NO_OPENSSL +QT_BEGIN_NAMESPACE +void qt_ForceTlsSecurityLevel(); +QT_END_NAMESPACE +#endif + class MyCookieJar; class tst_QNetworkReply: public QObject { @@ -1584,6 +1590,10 @@ void tst_QNetworkReply::initTestCase() QString::fromLatin1("Couldn't find echo dir starting from %1.").arg(QDir::currentPath()))); cleanupTestData(); +#ifndef QT_NO_OPENSSL + QT_PREPEND_NAMESPACE(qt_ForceTlsSecurityLevel)(); +#endif // QT_NO_OPENSSL + } void tst_QNetworkReply::cleanupTestCase() |