diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2021-07-14 15:58:08 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2021-07-20 21:17:50 +0200 |
commit | 9c67aa2da1fa8c0c1ec347ac43d0aabf1a35b429 (patch) | |
tree | eaff8d8b5f6412ca6864e78ae82d81a2dc422801 | |
parent | 5d7a58ea45ed834655220e05012ff17ac235131a (diff) |
tst_QSslSocket: fix and clean up allowedProtocolNegotiation
The server's socket may not have been created yet, so use the server's signal
instead.
Switch to QCOMPARE to get better output.
Delete the extra checking for schannel, we don't support Windows 8 anymore.
Pick-to: 6.2
Change-Id: Icd310c32939cb577c9f3438789f667aa0a3a4d85
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r-- | tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index c53b0385d1..105a6884a8 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -3800,12 +3800,6 @@ void tst_QSslSocket::allowedProtocolNegotiation() if (!hasServerAlpn) QSKIP("Server-side ALPN is unsupported, skipping test"); - if (isTestingSchannel) { - // TODO: move this check into the plugin (not to report ALPN as supported). - if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8_1) - QSKIP("ALPN is not supported on this version of Windows using Schannel."); - } - QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -3840,13 +3834,13 @@ void tst_QSslSocket::allowedProtocolNegotiation() loop.exit(); }; connect(&clientSocket, &QSslSocket::encrypted, &loop, earlyQuitter); - connect(server.socket, &QSslSocket::encrypted, &loop, earlyQuitter); + connect(&server, &SslServer::socketEncrypted, &loop, earlyQuitter); loop.exec(); - QVERIFY(server.socket->sslConfiguration().nextNegotiatedProtocol() == - clientSocket.sslConfiguration().nextNegotiatedProtocol()); - QVERIFY(server.socket->sslConfiguration().nextNegotiatedProtocol() == expectedNegotiated); + QCOMPARE(server.socket->sslConfiguration().nextNegotiatedProtocol(), + clientSocket.sslConfiguration().nextNegotiatedProtocol()); + QCOMPARE(server.socket->sslConfiguration().nextNegotiatedProtocol(), expectedNegotiated); } #if QT_CONFIG(openssl) |