Add warning to example regarding ignoring ssl errors
authorKurt Pattyn <pattyn.kurt@gmail.com>
Wed, 12 Mar 2014 13:53:00 +0000 (14:53 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 12 Mar 2014 14:30:00 +0000 (15:30 +0100)
Change-Id: I3d615a774f4071a085b0f233bef2eac76aefbefb
Reviewed-by: Richard J. Moore <rich@kde.org>
examples/sslechoclient/sslechoclient.cpp

index cf5b976..037990d 100644 (file)
@@ -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]