summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslcertificate.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-09-01 08:25:54 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-09-01 08:25:54 (GMT)
commit1051e9d0dc5cbad27b89756839f3619cae2d44fe (patch)
treecd25969458735e14c0b5de365760c3fd7747659d /src/network/ssl/qsslcertificate.cpp
parent0d411622521a89c04a416e2aaf3da44b6015b183 (diff)
parent8f1596ae9b64870c54958611552c71b0b390038f (diff)
downloadQt-1051e9d0dc5cbad27b89756839f3619cae2d44fe.zip
Qt-1051e9d0dc5cbad27b89756839f3619cae2d44fe.tar.gz
Qt-1051e9d0dc5cbad27b89756839f3619cae2d44fe.tar.bz2
Merge branch '4.6' of git:qt/qt into 4.6
Diffstat (limited to 'src/network/ssl/qsslcertificate.cpp')
-rw-r--r--src/network/ssl/qsslcertificate.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 666770d..c128da9 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)) + 1);
+
return d->serialNumberString;
}