Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.2
-
None
-
XP, W7, Linux(Arch)
-
0f16c7ce8dcd6f4905d14875088c55148e41366a
Description
i have written a small app which checks an ssl enabled servers certificate. When I ouput the serial number (lets say www.google.com) it prints out -1.
QSslConfiguration conf = socket->sslConfiguration();
this->peercert = conf.peerCertificate();
qDebug() << this->peercert.serialNumber();
If i debug the certificate there is a correct one (of course):
peercert->d->x509->cert_info->serialNumber
Maybe there is a bug in qsslcertificate.cpp, function serialNumber():
QByteArray QSslCertificate::serialNumber() const { // maybe serialNumberString is NOT empty and gets never updated if (d->serialNumberString.isEmpty() && d->x509) d->serialNumberString = QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->serialNumber))); return d->serialNumberString; }