diff options
author | Peter Hartmann <peter.hartmann@trolltech.com> | 2009-09-01 08:30:11 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@trolltech.com> | 2009-09-01 08:35:28 (GMT) |
commit | 67d5b1b800df55c61241c7fa33feeeea41a31513 (patch) | |
tree | 1cd7a9e31000daa5f96419989e15026b024caa8d /tests | |
parent | 8f1596ae9b64870c54958611552c71b0b390038f (diff) | |
download | Qt-67d5b1b800df55c61241c7fa33feeeea41a31513.zip Qt-67d5b1b800df55c61241c7fa33feeeea41a31513.tar.gz Qt-67d5b1b800df55c61241c7fa33feeeea41a31513.tar.bz2 |
QSslCertificate: fix previous patch, add autotest and documentation
The +1 must be added to the version, not the serial number.
Reviewed-by: trustme
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qsslcertificate/tst_qsslcertificate.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp index add48c4..4dfb6b9 100644 --- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp @@ -267,6 +267,8 @@ void tst_QSslCertificate::compareCertificates( QCOMPARE(cert1.alternateSubjectNames(), cert2.alternateSubjectNames()); QCOMPARE(cert1.effectiveDate(), cert2.effectiveDate()); QCOMPARE(cert1.expiryDate(), cert2.expiryDate()); + QCOMPARE(cert1.version(), cert2.version()); + QCOMPARE(cert1.serialNumber(), cert2.serialNumber()); // ### add more functions here ... } @@ -677,7 +679,9 @@ void tst_QSslCertificate::certInfo() QCOMPARE(cert.subjectInfo("C"), QString("NO")); QCOMPARE(cert.subjectInfo("ST"), QString()); - QCOMPARE(cert.version(), QByteArray()); + QCOMPARE(cert.version(), QByteArray::number(1)); + QCOMPARE(cert.serialNumber(), QByteArray::number(17)); + QCOMPARE(cert.toPem().constData(), (const char*)pem); QCOMPARE(cert.toDer(), QByteArray::fromHex(der)); |