summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2014-03-12 14:53:00 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-12 15:30:00 +0100
commitd4ac9f51f6d18a05016e3d61c06eace27501f589 (patch)
tree7ce38a77d2c8b990a9b939820f33394f492cb575 /examples
parentb05b0c07dd7b06412fd4a0cb3cc5d2e889236eff (diff)
downloadqtwebsockets-d4ac9f51f6d18a05016e3d61c06eace27501f589.tar.gz
Add warning to example regarding ignoring ssl errors
Change-Id: I3d615a774f4071a085b0f233bef2eac76aefbefb Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'examples')
-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]