Commit 8a370cea authored by Liang Qi's avatar Liang Qi
Browse files

Examples: fix certificate files for shadow build in sslechoserver


Change-Id: I2e5c35586c3cdc153abf9a70ee1ed6bba7894ecb
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: default avatarTopi Reiniö <topi.reinio@digia.com>
Showing with 10 additions and 2 deletions
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>localhost.cert</file>
<file>localhost.key</file>
</qresource>
</RCC>
......@@ -50,8 +50,8 @@ SslEchoServer::SslEchoServer(quint16 port, QObject *parent) :
QWebSocketServer::SecureMode,
this);
QSslConfiguration sslConfiguration;
QFile certFile(QStringLiteral("./localhost.cert"));
QFile keyFile(QStringLiteral("./localhost.key"));
QFile certFile(QStringLiteral(":/localhost.cert"));
QFile keyFile(QStringLiteral(":/localhost.key"));
certFile.open(QIODevice::ReadOnly);
keyFile.open(QIODevice::ReadOnly);
QSslCertificate certificate(&certFile, QSsl::Pem);
......
......@@ -15,3 +15,5 @@ HEADERS += \
sslechoserver.h
OTHER_FILES += sslechoclient.html
RESOURCES += securesocketclient.qrc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment