From c43f9a0c53420cf94a2ba6ff01e878654e844f5d Mon Sep 17 00:00:00 2001 From: Jens Trillmann Date: Fri, 26 Feb 2021 13:06:49 +0100 Subject: Pass ignoreSslErrors to unterlying QSslSocket When setting ignoreSslErrors(List) 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 (cherry picked from commit b13f23d232cfdd372ef812d427872d52eed2337e) Reviewed-by: Qt Cherry-pick Bot --- src/websockets/qwebsocket_p.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 &errors) { m_configuration.m_ignoredSslErrors = errors; + if (Q_LIKELY(m_pSocket)) { + QSslSocket *pSslSocket = qobject_cast(m_pSocket); + if (Q_LIKELY(pSslSocket)) + pSslSocket->ignoreSslErrors(errors); + } } /*! -- cgit v1.2.1