diff options
author | Timo Turunen <timo.p.turunen@nokia.com> | 2011-03-28 17:01:19 (GMT) |
---|---|---|
committer | Timo Turunen <timo.p.turunen@nokia.com> | 2011-03-28 17:01:19 (GMT) |
commit | c9511d642e7ab38ad2a47ba834580cfbda43ab65 (patch) | |
tree | d570f813c3d4683acec7c576d3812615dadd52ed | |
parent | b3f64f1b4eb949bd639c4a088121a4c5ad2eb743 (diff) | |
download | Qt-c9511d642e7ab38ad2a47ba834580cfbda43ab65.zip Qt-c9511d642e7ab38ad2a47ba834580cfbda43ab65.tar.gz Qt-c9511d642e7ab38ad2a47ba834580cfbda43ab65.tar.bz2 |
QSslCertificate: fix test for blacklisted certs on Windows
Apparently the wildcard matching and the SRCDIR hack don't go well
together.
Reviewed-by: Markus Goetz
Task-number: QTBUG-18338
(cherry picked from commit aeabe790203e7dcb1786e0dad7b4608f1e45b7d5)
Conflicts:
tests/auto/qsslcertificate/tst_qsslcertificate.cpp
-rw-r--r-- | tests/auto/qsslcertificate/tst_qsslcertificate.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp index ccc6af9..a8c5a4d 100644 --- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp @@ -817,6 +817,15 @@ void tst_QSslCertificate::largeExpirationDate() // QTBUG-12489 QCOMPARE(cert.expiryDate().toUTC(), QDateTime(QDate(2051, 8, 29), QTime(9, 53, 41), Qt::UTC)); } +void tst_QSslCertificate::blacklistedCertificates() +{ + QList<QSslCertificate> blacklistedCerts = QSslCertificate::fromPath("more-certificates/blacklisted*.pem", QSsl::Pem, QRegExp::Wildcard); + QVERIFY2(blacklistedCerts.count() > 0, "Please run this test from the source directory"); + for (int a = 0; a < blacklistedCerts.count(); a++) { + QVERIFY(! blacklistedCerts.at(a).isValid()); + } +} + #endif // QT_NO_OPENSSL QTEST_MAIN(tst_QSslCertificate) |