summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2022-09-02 13:50:49 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2022-09-03 13:01:06 +0200
commita7657d3c5ff1aafe347209dc6b76bd6d127694d9 (patch)
tree5230f27a19669503499078425eb212b315523c90 /tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
parent5d58aee53a916d09d77b817de73c08b9ed7e81dd (diff)
tst_QSslSocket::oldErrorsOnSocketReuse - make it work with OpenSSL v3
The initial problem was in server not starting encryption, because its certificate was rejected by OpenSSL (v3) saying 'weak md'. After the certificate was replaced, we got another problem - due to the fixed TLS v.1 protocol for both client and server - handshake is interrupted early with 'tls v1 alert' and error message saying about not found signature algorithms. Don't fix the protocol version, use proper QSsl::SecureProtocols (default). Pick-to: 6.4 6.3 6.2 5.15 Task-number: QTBUG-106018 Task-number: QTBUG-95123 Change-Id: I0f22f5304f4405933ad511195bc61c640518e7d8 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp')
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 172efada73..b18b001b77 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -4588,13 +4588,15 @@ void tst_QSslSocket::oldErrorsOnSocketReuse()
if (setProxy)
return; // not relevant
SslServer server;
- server.protocol = Test::TlsV1_1;
+ if (!isTestingOpenSsl)
+ server.protocol = Test::TlsV1_1;
server.m_certFile = testDataDir + "certs/fluke.cert";
server.m_keyFile = testDataDir + "certs/fluke.key";
QVERIFY(server.listen(QHostAddress::SpecialAddress::LocalHost));
QSslSocket socket;
- socket.setProtocol(Test::TlsV1_1);
+ if (!isTestingOpenSsl)
+ socket.setProtocol(Test::TlsV1_1);
QList<QSslError> errorList;
auto connection = connect(&socket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors),
[&socket, &errorList](const QList<QSslError> &errors) {