summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Trillmann <jens.trillmann@governikus.de>2021-02-26 13:06:49 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-22 09:24:40 +0000
commit62bcf8810f097e4fa13112a0cc7185e4abd34d29 (patch)
treecf334f3b6e591f510b4d6f4974262be0693f4328
parent6ad94be0b2e58fa49a5bb2450b710b0be14e12f2 (diff)
downloadqtwebsockets-62bcf8810f097e4fa13112a0cc7185e4abd34d29.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.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index 6930202..e0b4633 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -270,6 +270,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);
+ }
}
/*!