summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-24 03:01:54 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-24 03:01:54 +0100
commit3031fd369cfb5b7f03aabc61f239adc1268302ff (patch)
tree7ca3d976d081e260c798a96da35d93693fbc5b0b
parent5d66ee6af892f24b105e80d5b9634354395ce559 (diff)
parent5ee35abc39fe35ecf51faac01938ba7ca94e9fb8 (diff)
downloadqtwebsockets-3031fd369cfb5b7f03aabc61f239adc1268302ff.tar.gz
Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: I8cd45ab778b95b7d444b06940fd7b4ddc83a599b
-rw-r--r--tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp b/tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp
index 2f17619..64b2489 100644
--- a/tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp
+++ b/tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp
@@ -35,6 +35,7 @@
#ifndef QT_NO_SSL
#include <QtNetwork/qsslcipher.h>
#include <QtNetwork/qsslkey.h>
+#include <QtNetwork/qsslsocket.h>
#endif
#include <QtWebSockets/QWebSocketServer>
#include <QtWebSockets/QWebSocket>
@@ -402,6 +403,8 @@ void tst_QWebSocketServer::tst_preSharedKey()
list << cipher;
QSslConfiguration config = QSslConfiguration::defaultConfiguration();
+ if (QSslSocket::sslLibraryVersionNumber() >= 0x10101000L)
+ config.setProtocol(QSsl::TlsV1_2); // With TLS 1.3 there are some issues with PSK, force 1.2
config.setCiphers(list);
config.setPeerVerifyMode(QSslSocket::VerifyNone);
config.setPreSharedKeyIdentityHint(PSK_SERVER_IDENTITY_HINT);
@@ -422,6 +425,8 @@ void tst_QWebSocketServer::tst_preSharedKey()
QWebSocket socket;
QSslConfiguration socketConfig = QSslConfiguration::defaultConfiguration();
+ if (QSslSocket::sslLibraryVersionNumber() >= 0x10101000L)
+ socketConfig.setProtocol(QSsl::TlsV1_2); // With TLS 1.3 there are some issues with PSK, force 1.2
socketConfig.setPeerVerifyMode(QSslSocket::VerifyNone);
socketConfig.setCiphers(list);
socket.setSslConfiguration(socketConfig);