summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/websockets/sslechoserver/securesocketclient.qrc6
-rw-r--r--examples/websockets/sslechoserver/sslechoserver.cpp4
-rw-r--r--examples/websockets/sslechoserver/sslechoserver.pro2
3 files changed, 10 insertions, 2 deletions
diff --git a/examples/websockets/sslechoserver/securesocketclient.qrc b/examples/websockets/sslechoserver/securesocketclient.qrc
new file mode 100644
index 0000000..448fa92
--- /dev/null
+++ b/examples/websockets/sslechoserver/securesocketclient.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>localhost.cert</file>
+ <file>localhost.key</file>
+</qresource>
+</RCC>
diff --git a/examples/websockets/sslechoserver/sslechoserver.cpp b/examples/websockets/sslechoserver/sslechoserver.cpp
index e87180e..2849621 100644
--- a/examples/websockets/sslechoserver/sslechoserver.cpp
+++ b/examples/websockets/sslechoserver/sslechoserver.cpp
@@ -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);
diff --git a/examples/websockets/sslechoserver/sslechoserver.pro b/examples/websockets/sslechoserver/sslechoserver.pro
index 2663872..a1a5275 100644
--- a/examples/websockets/sslechoserver/sslechoserver.pro
+++ b/examples/websockets/sslechoserver/sslechoserver.pro
@@ -15,3 +15,5 @@ HEADERS += \
sslechoserver.h
OTHER_FILES += sslechoclient.html
+
+RESOURCES += securesocketclient.qrc