summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-04-27 05:22:20 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-04-27 05:22:20 (GMT)
commitdcf9a1f2f20248de0da9549af54bc3a4844eaf5b (patch)
treec9eee3ff39000816113bcab3a5c035da97c2a9fc /tests/auto/qsslcertificate/tst_qsslcertificate.cpp
parent47712d1f330e4b22ce6dd30e7557288ef7f7fca0 (diff)
parent415951891cd75170f1e4b89b46effa3319b56e4e (diff)
downloadQt-dcf9a1f2f20248de0da9549af54bc3a4844eaf5b.zip
Qt-dcf9a1f2f20248de0da9549af54bc3a4844eaf5b.tar.gz
Qt-dcf9a1f2f20248de0da9549af54bc3a4844eaf5b.tar.bz2
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt into 4.7
Diffstat (limited to 'tests/auto/qsslcertificate/tst_qsslcertificate.cpp')
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
index 1e3a8dd..57f2fa8 100644
--- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
@@ -111,6 +111,8 @@ private slots:
void nulInSan();
void largeSerialNumber();
void largeExpirationDate();
+ void blacklistedCertificates();
+
// ### add tests for certificate bundles (multiple certificates concatenated into a single
// structure); both PEM and DER formatted
#endif
@@ -817,6 +819,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)