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 /src | |
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 'src')
-rw-r--r-- | src/network/ssl/qsslcertificate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index c128da9..3793b1e 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -252,19 +252,19 @@ QByteArray QSslCertificate::version() const { if (d->versionString.isEmpty() && d->x509) d->versionString = - QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version))); + QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1); return d->versionString; } /*! - Returns the certificate's serial number string. + Returns the certificate's serial number string in decimal format. */ 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); + QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->serialNumber))); return d->serialNumberString; } |