summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket_p.h
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-16 11:26:04 +0200
commit8ddffc6ba4f38bb8dbeb0cf61b6b10ee73505bbb (patch)
treed370a49ed40eec55f680b35e8b493e0ab1c56fac /src/network/ssl/qsslsocket_p.h
parentc034089fa697e6dc22f04b3209768a9dc1abcb9c (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. Unfortunately, SSL_in_init was a macro in OpenSSL 1.0.x. We have to resolve SSL_state to implement SSL_in_init. Fixes: QTBUG-83450 Change-Id: I6326119f4e79605429263045ac20605c30dccca3 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 8907635da59c2ae0e8db01f27b24a841b830e655)
Diffstat (limited to 'src/network/ssl/qsslsocket_p.h')
-rw-r--r--src/network/ssl/qsslsocket_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index daa9be23f4..350b1f1fc1 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -208,6 +208,7 @@ protected:
bool verifyErrorsHaveBeenIgnored();
bool paused;
bool flushTriggered;
+ bool systemOrSslErrorDetected = false;
QVector<QOcspResponse> ocspResponses;
};