diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2019-09-27 16:16:52 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2019-10-07 11:34:39 +0200 |
commit | 3dd8f6dc34a1357018484158a5e91c3afc71ae77 (patch) | |
tree | e5b6775858a2f4a54878f88910187af000482356 /src/network | |
parent | e00d888daefbfbd5f17e0772421773f8e295087b (diff) |
Schannel: no longer keep old ssl errors around when reusing socket
And add a test for it so it can no longer happen in any current or
future implementation.
Change-Id: I3214aa90595e291b1e1c66befe185cfe1ea7bc6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/ssl/qsslsocket_schannel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/ssl/qsslsocket_schannel.cpp b/src/network/ssl/qsslsocket_schannel.cpp index 339ecf4da2..46c109b6e5 100644 --- a/src/network/ssl/qsslsocket_schannel.cpp +++ b/src/network/ssl/qsslsocket_schannel.cpp @@ -974,6 +974,7 @@ bool QSslSocketBackendPrivate::performHandshake() bool QSslSocketBackendPrivate::verifyHandshake() { Q_Q(QSslSocket); + sslErrors.clear(); const bool isClient = mode == QSslSocket::SslClientMode; #define CHECK_STATUS(status) \ @@ -1062,7 +1063,7 @@ bool QSslSocketBackendPrivate::verifyHandshake() } // verifyCertContext returns false if the user disconnected while it was checking errors. - if (certificateContext && sslErrors.isEmpty() && !verifyCertContext(certificateContext)) + if (certificateContext && !verifyCertContext(certificateContext)) return false; if (!checkSslErrors() || state != QAbstractSocket::ConnectedState) { |