summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-04-13 20:31:34 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-04-15 08:14:18 +0200
commit8907635da59c2ae0e8db01f27b24a841b830e655 (patch)
tree8a20d1fb9d09e9195528e93a05f0d818eb1a81b3 /src/network/ssl/qsslsocket.cpp
parent18fa1ed74745931c15d525703ac05bbf3f2c9c5b (diff)
OpenSSL: handle SSL_shutdown's errors properly
Do not call SSL_shutdown on a session that is in handshake state (SSL_in_init(s) returns 1). Also, do not call SSL_shutdown if a session encountered a fatal error (SSL_ERROR_SYSCALL or SSL_ERROR_SSL was found before). If SSL_shutdown was unsuccessful (returned code != 1), we have to clear the error(s) it queued. Fixes: QTBUG-83450 Change-Id: I6326119f4e79605429263045ac20605c30dccca3 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/ssl/qsslsocket.cpp')
-rw-r--r--src/network/ssl/qsslsocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 8f1d5d377d..f411732036 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -2241,7 +2241,7 @@ void QSslSocketPrivate::init()
pendingClose = false;
flushTriggered = false;
ocspResponses.clear();
-
+ systemOrSslErrorDetected = false;
// we don't want to clear the ignoreErrorsList, so
// that it is possible setting it before connecting
// ignoreErrorsList.clear();