diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2020-06-05 09:24:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-06-06 20:25:49 +0200 |
commit | 45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch) | |
tree | 363dfd46575d147206267d854ce14747157f432e /tests/auto/network | |
parent | aa81b90738ce9faee5e433617c8bd243cb238729 (diff) |
Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.
Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/network')
24 files changed, 56 insertions, 183 deletions
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index a2c6224ce0..915c30bfb3 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -14,7 +14,7 @@ osx linux # QTBUG-71953 [getFromHttp] -* !android !winrt +* !android [getFromHttpIntoBuffer] osx [getFromHttpIntoBuffer2] diff --git a/tests/auto/network/access/qnetworkreply/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/CMakeLists.txt index f7efa8f7f3..3b138b3918 100644 --- a/tests/auto/network/access/qnetworkreply/CMakeLists.txt +++ b/tests/auto/network/access/qnetworkreply/CMakeLists.txt @@ -1,7 +1,4 @@ # Generated from qnetworkreply.pro. +add_subdirectory(echo) add_subdirectory(test) - -if(NOT WINRT) - add_subdirectory(echo) -endif() diff --git a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro index d3a92436ac..ec6f35a8b1 100644 --- a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro +++ b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -!winrt:SUBDIRS += echo +SUBDIRS += echo test.depends += $$SUBDIRS SUBDIRS += test diff --git a/tests/auto/network/access/qnetworkreply/test/.prev_CMakeLists.txt b/tests/auto/network/access/qnetworkreply/test/.prev_CMakeLists.txt index 48759572de..9350c9afbf 100644 --- a/tests/auto/network/access/qnetworkreply/test/.prev_CMakeLists.txt +++ b/tests/auto/network/access/qnetworkreply/test/.prev_CMakeLists.txt @@ -55,5 +55,5 @@ add_qt_resource(tst_qnetworkreply "qnetworkreply" ## Scopes: ##################################################################### -#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../echo/echo" diff --git a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt index ef017edf58..50572444a1 100644 --- a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt +++ b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt @@ -56,5 +56,5 @@ add_qt_resource(tst_qnetworkreply "qnetworkreply" ## Scopes: ##################################################################### -#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../echo/echo" diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro index d3385c1929..bf09a99d27 100644 --- a/tests/auto/network/access/qnetworkreply/test/test.pro +++ b/tests/auto/network/access/qnetworkreply/test/test.pro @@ -13,7 +13,7 @@ RESOURCES += ../qnetworkreply.qrc TESTDATA += ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg ../certs \ ../index.html ../smb-file.txt -!android:!winrt: TEST_HELPER_INSTALLS = ../echo/echo +!android: TEST_HELPER_INSTALLS = ../echo/echo CONFIG += unsupported/testserver QT_TEST_SERVER_LIST = vsftpd apache2 ftp-proxy danted squid diff --git a/tests/auto/network/kernel/CMakeLists.txt b/tests/auto/network/kernel/CMakeLists.txt index 6ce3fcdf32..0b25020694 100644 --- a/tests/auto/network/kernel/CMakeLists.txt +++ b/tests/auto/network/kernel/CMakeLists.txt @@ -5,11 +5,6 @@ add_subdirectory(qnetworkdatagram) add_subdirectory(qnetworkaddressentry) add_subdirectory(qhostaddress) -if(NOT WINRT) - add_subdirectory(qnetworkproxy) - add_subdirectory(qnetworkproxyfactory) -endif() - if(QT_FEATURE_private_tests) add_subdirectory(qauthenticator) diff --git a/tests/auto/network/kernel/kernel.pro b/tests/auto/network/kernel/kernel.pro index 42df80dfa1..c13378cc02 100644 --- a/tests/auto/network/kernel/kernel.pro +++ b/tests/auto/network/kernel/kernel.pro @@ -11,10 +11,6 @@ SUBDIRS=\ qnetworkaddressentry \ qhostaddress \ -winrt: SUBDIRS -= \ - qnetworkproxy \ - qnetworkproxyfactory \ - osx: SUBDIRS -= \ # QTBUG-41847 qhostinfo \ diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp index 48f05a4604..ad8c4a8d1c 100644 --- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp +++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp @@ -38,9 +38,6 @@ #include <qdatastream.h> #ifdef Q_OS_WIN # include <qt_windows.h> -# if defined(Q_OS_WINRT) -# include <winsock2.h> -# endif #endif #ifdef Q_OS_ANDROID @@ -384,15 +381,12 @@ void tst_QHostAddress::assignment() QCOMPARE(address, QHostAddress("::1")); #endif - // WinRT does not support sockaddr_in -#ifndef Q_OS_WINRT QHostAddress addr("4.2.2.1"); sockaddr_in sockAddr; sockAddr.sin_family = AF_INET; sockAddr.sin_addr.s_addr = htonl(addr.toIPv4Address()); address.setAddress((sockaddr *)&sockAddr); QCOMPARE(address, addr); -#endif // !Q_OS_WINRT } QT_WARNING_POP diff --git a/tests/auto/network/kernel/qhostinfo/CMakeLists.txt b/tests/auto/network/kernel/qhostinfo/CMakeLists.txt index 19eae0611d..891312ae5e 100644 --- a/tests/auto/network/kernel/qhostinfo/CMakeLists.txt +++ b/tests/auto/network/kernel/qhostinfo/CMakeLists.txt @@ -26,6 +26,3 @@ extend_target(tst_qhostinfo CONDITION WIN32 PUBLIC_LIBRARIES ws2_32 ) - -#### Keys ignored in scope 3:.:.:qhostinfo.pro:WINRT: -# WINRT_MANIFEST.capabilities = "internetClientServer" diff --git a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro index d358cdf52c..e084f28229 100644 --- a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro +++ b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro @@ -7,5 +7,3 @@ requires(qtConfig(private_tests)) QT = core-private network-private testlib win32: QMAKE_USE += ws2_32 - -winrt: WINRT_MANIFEST.capabilities += internetClientServer diff --git a/tests/auto/network/socket/.prev_CMakeLists.txt b/tests/auto/network/socket/.prev_CMakeLists.txt new file mode 100644 index 0000000000..7e72b4be29 --- /dev/null +++ b/tests/auto/network/socket/.prev_CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from socket.pro. + +if(QT_FEATURE_private_tests) + add_subdirectory(qhttpsocketengine) + add_subdirectory(qtcpsocket) + add_subdirectory(qsocks5socketengine) + add_subdirectory(platformsocketengine) +endif() +add_subdirectory(qudpsocket) +add_subdirectory(qlocalsocket) +add_subdirectory(qtcpserver) +add_subdirectory(qabstractsocket) +if(QT_FEATURE_sctp) + add_subdirectory(qsctpsocket) +endif() diff --git a/tests/auto/network/socket/CMakeLists.txt b/tests/auto/network/socket/CMakeLists.txt index 5019e47140..a4b19ac1d6 100644 --- a/tests/auto/network/socket/CMakeLists.txt +++ b/tests/auto/network/socket/CMakeLists.txt @@ -1,20 +1,15 @@ # Generated from socket.pro. -add_subdirectory(qudpsocket) -### add_subdirectory(qlocalsocket) -add_subdirectory(qtcpserver) -add_subdirectory(qabstractsocket) - if(QT_FEATURE_private_tests) - add_subdirectory(platformsocketengine) + add_subdirectory(qhttpsocketengine) add_subdirectory(qtcpsocket) - - if(NOT WINRT) - add_subdirectory(qhttpsocketengine) - add_subdirectory(qsocks5socketengine) - endif() + add_subdirectory(qsocks5socketengine) + add_subdirectory(platformsocketengine) endif() - +add_subdirectory(qudpsocket) +### add_subdirectory(qlocalsocket) # special case +add_subdirectory(qtcpserver) +add_subdirectory(qabstractsocket) if(QT_FEATURE_sctp) add_subdirectory(qsctpsocket) endif() diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp index 68c913ecfc..88a39eea93 100644 --- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp +++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp @@ -48,11 +48,7 @@ #define PLATFORMSOCKETENGINE QNativeSocketEngine #define PLATFORMSOCKETENGINESTRING "QNativeSocketEngine" -#ifndef Q_OS_WINRT -# include <private/qnativesocketengine_p.h> -#else -# include <private/qnativesocketengine_winrt_p.h> -#endif +#include <private/qnativesocketengine_p.h> #include <qstringlist.h> @@ -79,9 +75,7 @@ private slots: void networkError(); void setSocketDescriptor(); void invalidSend(); -#ifndef Q_OS_WINRT void receiveUrgentData(); -#endif void tooManySockets(); }; @@ -582,9 +576,7 @@ void tst_PlatformSocketEngine::networkError() QCOMPARE(client.state(), QAbstractSocket::ConnectedState); // An unexpected network error! -#ifdef Q_OS_WINRT - client.close(); -#elif defined(Q_OS_WIN) +#if defined(Q_OS_WIN) // could use shutdown to produce different errors ::closesocket(client.socketDescriptor()); #else @@ -617,7 +609,6 @@ void tst_PlatformSocketEngine::invalidSend() } //--------------------------------------------------------------------------- -#ifndef Q_OS_WINRT void tst_PlatformSocketEngine::receiveUrgentData() { PLATFORMSOCKETENGINE server; @@ -680,7 +671,6 @@ void tst_PlatformSocketEngine::receiveUrgentData() QCOMPARE(response.at(0), msg); #endif } -#endif // !Q_OS_WINRT QTEST_MAIN(tst_PlatformSocketEngine) #include "tst_platformsocketengine.moc" diff --git a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp index 5c66ef6520..7cb65cd1a3 100644 --- a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp +++ b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp @@ -29,14 +29,14 @@ #include <QtCore> #include <QtNetwork> -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC) +#if defined(Q_OS_WIN) && defined(Q_CC_MSVC) # include <crtdbg.h> #endif int main(int argc, char *argv[]) { // Windows: Suppress crash notification dialog. -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC) +#if defined(Q_OS_WIN) && defined(Q_CC_MSVC) _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); #endif QCoreApplication app(argc, argv); diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index 094e28149c..927dc5cf9a 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -88,9 +88,7 @@ private slots: void maxPendingConnections(); void listenError(); void waitForConnectionTest(); -#ifndef Q_OS_WINRT void setSocketDescriptor(); -#endif void listenWhileListening(); void addressReusable(); void setNewSocketDescriptorBlocking(); @@ -527,7 +525,6 @@ void tst_QTcpServer::waitForConnectionTest() } //---------------------------------------------------------------------------------- -#ifndef Q_OS_WINRT void tst_QTcpServer::setSocketDescriptor() { QTcpServer server; @@ -557,7 +554,6 @@ void tst_QTcpServer::setSocketDescriptor() WSACleanup(); #endif } -#endif // !Q_OS_WINRT //---------------------------------------------------------------------------------- void tst_QTcpServer::listenWhileListening() @@ -579,7 +575,6 @@ public: bool ok; protected: -#ifndef Q_OS_WINRT void incomingConnection(qintptr socketDescriptor) { // how a user woulddo it (qabstractsocketengine is not public) @@ -592,7 +587,6 @@ protected: ::close(socketDescriptor); #endif } -#endif // !Q_OS_WINRT }; void tst_QTcpServer::addressReusable() diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp index 88d2c46f3d..3c4728afec 100644 --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp @@ -126,9 +126,7 @@ private slots: void bindThenResolveHost_data(); void bindThenResolveHost(); void setInvalidSocketDescriptor(); -#ifndef Q_OS_WINRT void setSocketDescriptor(); -#endif void socketDescriptor(); void blockingIMAP(); void nonBlockingIMAP(); @@ -738,7 +736,6 @@ void tst_QTcpSocket::setInvalidSocketDescriptor() //---------------------------------------------------------------------------------- -#ifndef Q_OS_WINRT void tst_QTcpSocket::setSocketDescriptor() { QFETCH_GLOBAL(bool, setProxy); @@ -782,7 +779,6 @@ void tst_QTcpSocket::setSocketDescriptor() delete dummy; #endif } -#endif // !Q_OS_WINRT //---------------------------------------------------------------------------------- diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index b69bfb106c..425d61127a 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -1276,9 +1276,6 @@ void tst_QUdpSocket::multicastTtlOption_data() void tst_QUdpSocket::multicastTtlOption() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, bindAddress); QFETCH(int, ttl); @@ -1326,9 +1323,6 @@ void tst_QUdpSocket::multicastLoopbackOption_data() void tst_QUdpSocket::multicastLoopbackOption() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, bindAddress); QFETCH(int, loopback); @@ -1365,9 +1359,6 @@ void tst_QUdpSocket::multicastJoinBeforeBind_data() void tst_QUdpSocket::multicastJoinBeforeBind() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH(QHostAddress, groupAddress); QUdpSocket udpSocket; @@ -1387,9 +1378,6 @@ void tst_QUdpSocket::multicastLeaveAfterClose_data() void tst_QUdpSocket::multicastLeaveAfterClose() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, groupAddress); if (setProxy) @@ -1434,9 +1422,6 @@ void tst_QUdpSocket::setMulticastInterface_data() void tst_QUdpSocket::setMulticastInterface() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QNetworkInterface, iface); QFETCH(QHostAddress, address); @@ -1494,9 +1479,6 @@ void tst_QUdpSocket::multicast_data() void tst_QUdpSocket::multicast() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, bindAddress); QFETCH(bool, bindResult); diff --git a/tests/auto/network/socket/socket.pro b/tests/auto/network/socket/socket.pro index 06fe356a5a..1248d71172 100644 --- a/tests/auto/network/socket/socket.pro +++ b/tests/auto/network/socket/socket.pro @@ -20,7 +20,3 @@ SUBDIRS=\ !qtConfig(sctp): SUBDIRS -= \ qsctpsocket \ - -winrt: SUBDIRS -= \ - qhttpsocketengine \ - qsocks5socketengine \ diff --git a/tests/auto/network/ssl/CMakeLists.txt b/tests/auto/network/ssl/CMakeLists.txt index c10cfabbf4..6d4dc15cc8 100644 --- a/tests/auto/network/ssl/CMakeLists.txt +++ b/tests/auto/network/ssl/CMakeLists.txt @@ -6,31 +6,17 @@ add_subdirectory(qsslcipher) add_subdirectory(qsslellipticcurve) add_subdirectory(qsslerror) add_subdirectory(qsslkey) - -if(QT_FEATURE_ssl) - - if(QT_FEATURE_private_tests) - add_subdirectory(qsslsocket) - if(NOT WINRT) - add_subdirectory(qsslsocket_onDemandCertificates_member) - add_subdirectory(qsslsocket_onDemandCertificates_static) - endif() - - if(QT_FEATURE_dtls) - add_subdirectory(qdtlscookie) - add_subdirectory(qdtls) - endif() - - if(QT_FEATURE_ocsp) - add_subdirectory(qocsp) - endif() - endif() +if(QT_FEATURE_private_tests AND QT_FEATURE_ssl) + add_subdirectory(qsslsocket) + add_subdirectory(qsslsocket_onDemandCertificates_member) + add_subdirectory(qsslsocket_onDemandCertificates_static) + add_subdirectory(qasn1element) + add_subdirectory(qssldiffiehellmanparameters) endif() - -if(QT_FEATURE_ssl) - - if(QT_FEATURE_private_tests) - add_subdirectory(qasn1element) - add_subdirectory(qssldiffiehellmanparameters) - endif() +if(QT_FEATURE_dtls AND QT_FEATURE_private_tests AND QT_FEATURE_ssl) + add_subdirectory(qdtlscookie) + add_subdirectory(qdtls) +endif() +if(QT_FEATURE_ocsp AND QT_FEATURE_private_tests AND QT_FEATURE_ssl) + add_subdirectory(qocsp) endif() diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp index 0611deb184..69a90c9c83 100644 --- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp @@ -819,7 +819,7 @@ void tst_QSslCertificate::task256066toPem() void tst_QSslCertificate::nulInCN() { -#if QT_CONFIG(securetransport) || defined(Q_OS_WINRT) || QT_CONFIG(schannel) +#if QT_CONFIG(securetransport) || QT_CONFIG(schannel) QSKIP("Generic QSslCertificatePrivate fails this test"); #endif QList<QSslCertificate> certList = @@ -838,7 +838,7 @@ void tst_QSslCertificate::nulInCN() void tst_QSslCertificate::nulInSan() { -#if QT_CONFIG(securetransport) || defined(Q_OS_WINRT) || QT_CONFIG(schannel) +#if QT_CONFIG(securetransport) || QT_CONFIG(schannel) QSKIP("Generic QSslCertificatePrivate fails this test"); #endif QList<QSslCertificate> certList = @@ -934,7 +934,7 @@ void tst_QSslCertificate::toText() QString txtcert = cert.toText(); #ifdef QT_NO_OPENSSL - QEXPECT_FAIL("", "QTBUG-40884: QSslCertificate::toText is not implemented on WinRT", Continue); + QEXPECT_FAIL("", "QSslCertificate::toText is not implemented on platforms which do not use openssl", Continue); #endif QVERIFY(QString::fromLatin1(txt098) == txtcert || QString::fromLatin1(txt100) == txtcert || @@ -990,7 +990,7 @@ void tst_QSslCertificate::verify() ) #ifdef QT_NO_OPENSSL - QEXPECT_FAIL("", "QTBUG-40884: WinRT API does not yet support verifying a chain", Abort); + QEXPECT_FAIL("", "Verifying a chain is not supported without openssl", Abort); // TODO? #endif // Empty chain is unspecified error errors = QSslCertificate::verify(toVerify); @@ -1323,7 +1323,7 @@ void tst_QSslCertificate::pkcs12() QList<QSslCertificate> caCerts; #ifdef QT_NO_OPENSSL - QEXPECT_FAIL("", "QTBUG-40884: WinRT API does not support pkcs12 imports", Abort); + QEXPECT_FAIL("", "pkcs12 imports are only supported when openssl is used", Abort); // TODO? #endif ok = QSslCertificate::importPkcs12(&f, &key, &cert, &caCerts); QVERIFY(ok); diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp index 1807315061..ce223a53ef 100644 --- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp +++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp @@ -167,9 +167,9 @@ void tst_QSslKey::createPlainTestRows(bool pemOnly) foreach (KeyInfo keyInfo, keyInfoList) { if (pemOnly && keyInfo.format != QSsl::EncodingFormat::Pem) continue; -#if defined(Q_OS_WINRT) || QT_CONFIG(schannel) +#if QT_CONFIG(schannel) if (keyInfo.fileInfo.fileName().contains("RC2-64")) - continue; // WinRT/Schannel treats RC2 as 128 bit + continue; // Schannel treats RC2 as 128 bit #endif #if !defined(QT_NO_SSL) && defined(QT_NO_OPENSSL) // generic backend if (keyInfo.fileInfo.fileName().contains(QRegularExpression("-aes\\d\\d\\d-"))) @@ -702,11 +702,11 @@ void tst_QSslKey::encrypt() QFETCH(QByteArray, cipherText); QFETCH(QByteArray, iv); -#if defined(Q_OS_WINRT) || QT_CONFIG(schannel) - QEXPECT_FAIL("RC2-40-CBC, length 0", "WinRT/Schannel treats RC2 as 128-bit", Abort); - QEXPECT_FAIL("RC2-40-CBC, length 8", "WinRT/Schannel treats RC2 as 128-bit", Abort); - QEXPECT_FAIL("RC2-64-CBC, length 0", "WinRT/Schannel treats RC2 as 128-bit", Abort); - QEXPECT_FAIL("RC2-64-CBC, length 8", "WinRT/Schannel treats RC2 as 128-bit", Abort); +#if QT_CONFIG(schannel) + QEXPECT_FAIL("RC2-40-CBC, length 0", "Schannel treats RC2 as 128-bit", Abort); + QEXPECT_FAIL("RC2-40-CBC, length 8", "Schannel treats RC2 as 128-bit", Abort); + QEXPECT_FAIL("RC2-64-CBC, length 0", "Schannel treats RC2 as 128-bit", Abort); + QEXPECT_FAIL("RC2-64-CBC, length 8", "Schannel treats RC2 as 128-bit", Abort); #endif QByteArray encrypted = QSslKeyPrivate::encrypt(cipher, plainText, key, iv); QCOMPARE(encrypted, cipherText); diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index 0ac87a9cb1..538864db6c 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -1307,9 +1307,6 @@ protected slots: void tst_QSslSocket::protocolServerSide_data() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QTest::addColumn<QSsl::SslProtocol>("serverProtocol"); QTest::addColumn<QSsl::SslProtocol>("clientProtocol"); QTest::addColumn<bool>("works"); @@ -1413,9 +1410,6 @@ void tst_QSslSocket::protocolServerSide() void tst_QSslSocket::serverCipherPreferences() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) { qWarning("SSL not supported, skipping test"); return; @@ -1542,9 +1536,6 @@ void tst_QSslSocket::localCertificateChain() void tst_QSslSocket::setLocalCertificateChain() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) return; @@ -1587,9 +1578,6 @@ void tst_QSslSocket::setPrivateKey() void tst_QSslSocket::setSocketDescriptor() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) return; @@ -1995,9 +1983,6 @@ protected: void tst_QSslSocket::setEmptyKey() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) return; @@ -2019,9 +2004,6 @@ void tst_QSslSocket::setEmptyKey() void tst_QSslSocket::spontaneousWrite() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2067,9 +2049,6 @@ void tst_QSslSocket::spontaneousWrite() void tst_QSslSocket::setReadBufferSize() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2331,9 +2310,6 @@ void tst_QSslSocket::waitForMinusOne() #ifdef Q_OS_WIN QSKIP("QTBUG-24451 - indefinite wait may hang"); #endif -#ifdef Q_OS_WINRT // This can stay in case the one above goes away - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2412,9 +2388,6 @@ protected: void tst_QSslSocket::verifyMode() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2698,9 +2671,6 @@ void tst_QSslSocket::ignoreSslErrorsListWithSlot() void tst_QSslSocket::abortOnSslErrors() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2800,9 +2770,6 @@ void tst_QSslSocket::writeBigChunk() void tst_QSslSocket::blacklistedCertificates() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -3064,9 +3031,6 @@ protected: void tst_QSslSocket::qtbug18498_peek() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -3140,9 +3104,6 @@ protected: void tst_QSslSocket::qtbug18498_peek2() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -3246,9 +3207,6 @@ void tst_QSslSocket::qtbug18498_peek2() void tst_QSslSocket::dhServer() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) QSKIP("No SSL support"); @@ -3358,9 +3316,6 @@ void tst_QSslSocket::dhServerCustomParams() void tst_QSslSocket::ecdhServer() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) { qWarning("SSL not supported, skipping test"); return; @@ -3467,9 +3422,6 @@ void tst_QSslSocket::verifyClientCertificate() // success instead of failure etc.). QSKIP("This test can not work with Secure Transport"); #endif // QT_CONFIG(securetransport) -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) { qWarning("SSL not supported, skipping test"); return; @@ -4049,9 +4001,6 @@ void tst_QSslSocket::simplePskConnect() void tst_QSslSocket::ephemeralServerKey_data() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QTest::addColumn<QString>("cipher"); QTest::addColumn<bool>("emptyKey"); @@ -4084,9 +4033,6 @@ void tst_QSslSocket::ephemeralServerKey() void tst_QSslSocket::pskServer() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif #if QT_CONFIG(schannel) QSKIP("Schannel does not have PSK support implemented."); #endif diff --git a/tests/auto/network/ssl/ssl.pro b/tests/auto/network/ssl/ssl.pro index 169e9bce83..014ff34064 100644 --- a/tests/auto/network/ssl/ssl.pro +++ b/tests/auto/network/ssl/ssl.pro @@ -26,10 +26,6 @@ qtConfig(ssl) { } } -winrt: SUBDIRS -= \ - qsslsocket_onDemandCertificates_member \ - qsslsocket_onDemandCertificates_static \ - qtConfig(ssl) { qtConfig(private_tests) { SUBDIRS += qasn1element \ |