aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMÃ¥rten Nordheim <marten.nordheim@qt.io>2023-07-07 10:26:48 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-07-10 07:55:34 +0000
commitb08ca91564ec524d876c971f3832ff88b82088cc (patch)
tree119fdf2ceb50aad718a8666932bf4989d5f2cc3e
parenteb04a96552271042779bf9438f3bf36d805483b8 (diff)
tst_QWebSocketServer: move qsslpskauthenticator uses into ssl-guard
It previously was conditioned on 'openssl', but since the TLS backends turned into plugins it is not useful to check for this #define anymore. The ifdef was removed, but still requires the 'ssl' feature. Change-Id: I6ea59baff5040a2825f8630b51efab2476990b95 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 95faeb4d75ee295f03f5d4739ecbfef5cbaaa8de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp b/tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp
index c0ba30c..3763a17 100644
--- a/tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp
+++ b/tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp
@@ -6,8 +6,8 @@
#include <QTcpSocket>
#include <QTcpServer>
#include <QtCore/QScopedPointer>
-#include <QtNetwork/qsslpresharedkeyauthenticator.h>
#ifndef QT_NO_SSL
+#include <QtNetwork/qsslpresharedkeyauthenticator.h>
#include <QtNetwork/qsslcipher.h>
#include <QtNetwork/qsslkey.h>
#include <QtNetwork/qsslsocket.h>
@@ -44,6 +44,7 @@ public:
QByteArray m_psk;
public slots:
+#if QT_CONFIG(ssl)
void providePsk(QSslPreSharedKeyAuthenticator *authenticator)
{
QVERIFY(authenticator);
@@ -65,6 +66,7 @@ public slots:
QCOMPARE(authenticator->preSharedKey(), m_psk);
}
}
+#endif
};
class tst_QWebSocketServer : public QObject
@@ -84,7 +86,9 @@ private Q_SLOTS:
void tst_connectivity();
void tst_protocols_data();
void tst_protocols();
+#if QT_CONFIG(ssl)
void tst_preSharedKey();
+#endif
void tst_maxPendingConnections();
void tst_serverDestroyedWhileSocketConnected();
void tst_scheme(); // qtbug-55927
@@ -409,6 +413,7 @@ void tst_QWebSocketServer::tst_protocols()
QCOMPARE(serverSocket->handshakeOptions().subprotocols(), clientProtocols + headerProtocols);
}
+#if QT_CONFIG(ssl)
void tst_QWebSocketServer::tst_preSharedKey()
{
if (m_shouldSkipUnsupportedIpv6Test)
@@ -491,6 +496,7 @@ void tst_QWebSocketServer::tst_preSharedKey()
QCOMPARE(sslErrorsSpy.size(), 0);
QCOMPARE(serverErrorSpy.size(), 0);
}
+#endif
void tst_QWebSocketServer::tst_maxPendingConnections()
{