summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-11-11 09:29:17 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-11-11 09:29:17 +0200
commit4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (patch)
treecc68622c9b85992d99a8373ab55471ee821a4ebf /tests/auto/network
parentab28ff2207e8f33754c79793089dbf943d67736d (diff)
parentebb49c66aaf22ed55d62ff7bc3690fce00b7d8ba (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Diffstat (limited to 'tests/auto/network')
-rw-r--r--tests/auto/network/access/qdecompresshelper/BLACKLIST2
-rw-r--r--tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp30
-rw-r--r--tests/auto/network/socket/qtcpserver/BLACKLIST3
-rw-r--r--tests/auto/network/socket/qtcpsocket/BLACKLIST2
-rw-r--r--tests/auto/network/socket/qudpsocket/BLACKLIST4
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp3
6 files changed, 44 insertions, 0 deletions
diff --git a/tests/auto/network/access/qdecompresshelper/BLACKLIST b/tests/auto/network/access/qdecompresshelper/BLACKLIST
new file mode 100644
index 0000000000..d189fd9e00
--- /dev/null
+++ b/tests/auto/network/access/qdecompresshelper/BLACKLIST
@@ -0,0 +1,2 @@
+[bigZlib]
+macos arm
diff --git a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
index cec05f8806..6ae53e2ccd 100644
--- a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
+++ b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
@@ -48,6 +48,8 @@ private Q_SLOTS:
void ntlmAuth_data();
void ntlmAuth();
+ void sha256AndMd5Digest();
+
void equalityOperators();
};
@@ -149,6 +151,34 @@ void tst_QAuthenticator::ntlmAuth()
QVERIFY(priv->calculateResponse("GET", "/", "").startsWith("NTLM "));
}
+// We don't (currently) support SHA256. So, when presented with the option of MD5 or SHA256,
+// we should always pick MD5.
+void tst_QAuthenticator::sha256AndMd5Digest()
+{
+ QByteArray md5 = "Digest realm=\"\", nonce=\"\", algorithm=MD5, qop=\"auth\"";
+ QByteArray sha256 = "Digest realm=\"\", nonce=\"\", algorithm=SHA-256, qop=\"auth\"";
+
+ QAuthenticator auth;
+ auth.setUser("unimportant");
+ auth.setPassword("unimportant");
+
+ QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(auth);
+
+ QCOMPARE(priv->phase, QAuthenticatorPrivate::Start);
+ QList<QPair<QByteArray, QByteArray>> headers;
+ // Put sha256 first, so that its parsed first...
+ headers.push_back({"WWW-Authenticate", sha256});
+ headers.push_back({"WWW-Authenticate", md5});
+ priv->parseHttpResponse(headers, false, QString());
+
+ QByteArray response = priv->calculateResponse("GET", "/index", {});
+ QCOMPARE(priv->phase, QAuthenticatorPrivate::Done);
+
+ QVERIFY(!response.isEmpty());
+ QVERIFY(!response.contains("algorithm=SHA-256"));
+ QVERIFY(response.contains("algorithm=MD5"));
+}
+
void tst_QAuthenticator::equalityOperators()
{
QAuthenticator s1, s2;
diff --git a/tests/auto/network/socket/qtcpserver/BLACKLIST b/tests/auto/network/socket/qtcpserver/BLACKLIST
index e268468bdb..c6d4d49908 100644
--- a/tests/auto/network/socket/qtcpserver/BLACKLIST
+++ b/tests/auto/network/socket/qtcpserver/BLACKLIST
@@ -14,3 +14,6 @@ windows-10
windows-7sp1
windows-10
+[linkLocal]
+macos arm
+
diff --git a/tests/auto/network/socket/qtcpsocket/BLACKLIST b/tests/auto/network/socket/qtcpsocket/BLACKLIST
index 129e9f0b4e..fb57715a49 100644
--- a/tests/auto/network/socket/qtcpsocket/BLACKLIST
+++ b/tests/auto/network/socket/qtcpsocket/BLACKLIST
@@ -2,3 +2,5 @@
windows
# QTBUG-66247
+[bind]
+macos arm
diff --git a/tests/auto/network/socket/qudpsocket/BLACKLIST b/tests/auto/network/socket/qudpsocket/BLACKLIST
index 40e06ca10a..690d814a2c 100644
--- a/tests/auto/network/socket/qudpsocket/BLACKLIST
+++ b/tests/auto/network/socket/qudpsocket/BLACKLIST
@@ -7,3 +7,7 @@ opensuse-leap
opensuse-42.3
[readyReadForEmptyDatagram]
linux
+[multicast]
+macos arm
+[linkLocalIPv6]
+macos arm
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index a40ec30622..0dc211dc7d 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -1623,6 +1623,9 @@ void tst_QSslSocket::setSocketDescriptor()
void tst_QSslSocket::setSslConfiguration_data()
{
+#if QT_CONFIG(securetransport)
+ QSKIP("Skipping the cases with certificate, SecureTransport does not like old certificate on the test server");
+#endif // securetransport
QTest::addColumn<QSslConfiguration>("configuration");
QTest::addColumn<bool>("works");