diff options
author | Raul Metsma <raul@innovaatik.ee> | 2009-09-01 08:14:07 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@trolltech.com> | 2009-09-01 08:14:07 (GMT) |
commit | 16edcd5ff94ecc731146e3703aaf25cd6bb3fb67 (patch) | |
tree | 056f368df580cd919620811e85d5be208691bd82 /src/network/ssl/qsslcertificate.cpp | |
parent | 76d18f5f06f55c7f908ceb9fba4cac41c0c852f8 (diff) | |
download | Qt-16edcd5ff94ecc731146e3703aaf25cd6bb3fb67.zip Qt-16edcd5ff94ecc731146e3703aaf25cd6bb3fb67.tar.gz Qt-16edcd5ff94ecc731146e3703aaf25cd6bb3fb67.tar.bz2 |
Implement QSslCertificate::version() and QSslCertificate::serialNumber()
Task-number: 251830
Merge-request: 1383
Reviewed-by: Peter Hartmann <peter.hartmann@trolltech.com>
Diffstat (limited to 'src/network/ssl/qsslcertificate.cpp')
-rw-r--r-- | src/network/ssl/qsslcertificate.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 666770d..5db6d0a 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -250,6 +250,10 @@ void QSslCertificate::clear() */ QByteArray QSslCertificate::version() const { + if (d->versionString.isEmpty() && d->x509) + d->versionString = + QByteArray::number( qlonglong(q_ASN1_INTEGER_get( d->x509->cert_info->version )) ); + return d->versionString; } @@ -258,6 +262,10 @@ QByteArray QSslCertificate::version() const */ QByteArray QSslCertificate::serialNumber() const { + if (d->serialNumberString.isEmpty() && d->x509) + d->serialNumberString = + QByteArray::number( qlonglong(q_ASN1_INTEGER_get( d->x509->cert_info->serialNumber )) ); + return d->serialNumberString; } |