diff options
author | Jens Trillmann <jens.trillmann@governikus.de> | 2021-02-26 13:06:49 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-22 09:09:40 +0000 |
commit | c43f9a0c53420cf94a2ba6ff01e878654e844f5d (patch) | |
tree | 27c5eb39338cbbd6e5044f3d717f600c3ced497f | |
parent | 56c4699b432ad2ea9e1de9922ee97ac7c637f2fc (diff) | |
download | qtwebsockets-c43f9a0c53420cf94a2ba6ff01e878654e844f5d.tar.gz |
Pass ignoreSslErrors to unterlying QSslSocket
When setting ignoreSslErrors(List<QSslError>) during the sslErrors
signal handling the call got ignored. Only the internal config for
creating a QSslSocket would be updated but not the current QSslSocket.
The request of the caller to ignore specific QSslErrors would be
ignored.
Change-Id: I6aaea2111fe1d26e07e6eaaa7532ae1b14a187a8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit b13f23d232cfdd372ef812d427872d52eed2337e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp index 8529538..db6971f 100644 --- a/src/websockets/qwebsocket_p.cpp +++ b/src/websockets/qwebsocket_p.cpp @@ -267,6 +267,11 @@ QSslConfiguration QWebSocketPrivate::sslConfiguration() const void QWebSocketPrivate::ignoreSslErrors(const QList<QSslError> &errors) { m_configuration.m_ignoredSslErrors = errors; + if (Q_LIKELY(m_pSocket)) { + QSslSocket *pSslSocket = qobject_cast<QSslSocket *>(m_pSocket); + if (Q_LIKELY(pSslSocket)) + pSslSocket->ignoreSslErrors(errors); + } } /*! |