tst_QSslSocket: ignore order of sslErrors list
In Schannel it is not guaranteed CertificateBlacklisted will be the first error emitted. And it really does not make a difference anyway. Pick-to: 6.6 6.5 6.2 Change-Id: If041f913db9e78ac54e6f8bb2ba1bda110e7d64a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
eed17b3634
commit
e09b1373c2
@ -3080,7 +3080,14 @@ void tst_QSslSocket::blacklistedCertificates()
|
||||
QList<QSslError> sslErrors = receiver->sslHandshakeErrors();
|
||||
QVERIFY(sslErrors.size() > 0);
|
||||
// there are more errors (self signed cert and hostname mismatch), but we only care about the blacklist error
|
||||
QCOMPARE(sslErrors.at(0).error(), QSslError::CertificateBlacklisted);
|
||||
std::optional<QSslError> blacklistedError;
|
||||
for (const QSslError &error : sslErrors) {
|
||||
if (error.error() == QSslError::CertificateBlacklisted) {
|
||||
blacklistedError = error;
|
||||
break;
|
||||
}
|
||||
}
|
||||
QVERIFY2(blacklistedError, "CertificateBlacklisted error not found!");
|
||||
}
|
||||
|
||||
void tst_QSslSocket::versionAccessors()
|
||||
|
Loading…
Reference in New Issue
Block a user