From 2253d5eca6de707080af9af11bc0dcfdea846fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Wed, 9 Sep 2020 15:06:28 +0200 Subject: Schannel: Properly handle request for certificate Certain servers, like smtp.live.com, will send a request for a certificate even though they don't require one. In Schannel this manifests as a warning/info status (SEC_I_INCOMPLETE_CREDENTIALS). In the cases where it's not needed we should suppress the warning and try to connect anyway, which is done by calling InitializeSecurityContext again when we get the status. Pick-to: 5.15 Change-Id: I3c48140f2949d8557251a49a2b66946da9395736 Reviewed-by: Joshua GPBeta Reviewed-by: Timur Pocheptsov --- tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index 1718b787f5..321eede9c9 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -3391,14 +3391,6 @@ void tst_QSslSocket::verifyClientCertificate() // check server socket QVERIFY(server.socket); -#if QT_CONFIG(schannel) - // As additional info to the QEXPECT_FAIL below: - // This is because schannel treats it as an error (client side) if you don't have a certificate - // when asked for one. - QEXPECT_FAIL("NoCert:VerifyPeer", - "The client disconnects first, which causes the event " - "loop to quit before the server disconnects.", Continue); -#endif QCOMPARE(server.socket->state(), expectedState); QCOMPARE(server.socket->isEncrypted(), works); -- cgit v1.2.3