summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/sslechoclient/sslechoclient.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/sslechoclient/sslechoclient.cpp b/examples/sslechoclient/sslechoclient.cpp
index cf5b976..037990d 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]