diff --git a/examples/sslechoclient/sslechoclient.cpp b/examples/sslechoclient/sslechoclient.cpp index cf5b9764c4cf59a8aa095fa63252836730f2391a..037990d6bc84eac612008e99912347916cd04550 100644 --- a/examples/sslechoclient/sslechoclient.cpp +++ b/examples/sslechoclient/sslechoclient.cpp @@ -78,6 +78,11 @@ void SslEchoClient::onTextMessageReceived(QString message) void SslEchoClient::onSslErrors(const QList<QSslError> &errors) { Q_UNUSED(errors); + + // WARNING: Never ignore SSL errors in production code. + // The proper way to handle self-signed certificates is to add a custom root + // to the CA store. + m_webSocket.ignoreSslErrors(); } //! [onTextMessageReceived]