Commit 3031fd36 authored by Qt Forward Merge Bot's avatar Qt Forward Merge Bot
Browse files

Merge remote-tracking branch 'origin/5.11' into 5.12

Change-Id: I8cd45ab778b95b7d444b06940fd7b4ddc83a599b
parents 5d66ee6a 5ee35abc
No related merge requests found
Showing with 5 additions and 0 deletions
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#ifndef QT_NO_SSL #ifndef QT_NO_SSL
#include <QtNetwork/qsslcipher.h> #include <QtNetwork/qsslcipher.h>
#include <QtNetwork/qsslkey.h> #include <QtNetwork/qsslkey.h>
#include <QtNetwork/qsslsocket.h>
#endif #endif
#include <QtWebSockets/QWebSocketServer> #include <QtWebSockets/QWebSocketServer>
#include <QtWebSockets/QWebSocket> #include <QtWebSockets/QWebSocket>
...@@ -402,6 +403,8 @@ void tst_QWebSocketServer::tst_preSharedKey() ...@@ -402,6 +403,8 @@ void tst_QWebSocketServer::tst_preSharedKey()
list << cipher; list << cipher;
QSslConfiguration config = QSslConfiguration::defaultConfiguration(); 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.setCiphers(list);
config.setPeerVerifyMode(QSslSocket::VerifyNone); config.setPeerVerifyMode(QSslSocket::VerifyNone);
config.setPreSharedKeyIdentityHint(PSK_SERVER_IDENTITY_HINT); config.setPreSharedKeyIdentityHint(PSK_SERVER_IDENTITY_HINT);
...@@ -422,6 +425,8 @@ void tst_QWebSocketServer::tst_preSharedKey() ...@@ -422,6 +425,8 @@ void tst_QWebSocketServer::tst_preSharedKey()
QWebSocket socket; QWebSocket socket;
QSslConfiguration socketConfig = QSslConfiguration::defaultConfiguration(); 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.setPeerVerifyMode(QSslSocket::VerifyNone);
socketConfig.setCiphers(list); socketConfig.setCiphers(list);
socket.setSslConfiguration(socketConfig); socket.setSslConfiguration(socketConfig);
......
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