Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.14.2, 5.15.0, 5.15.1
-
None
-
-
aa6b865899f1ef1b9960d70763cbd19cc18fffd4 (qt/qtbase/dev)
Description
If x509 certificate has extension "Subject Alternative Name" we can read it but it not has a correct value. Code below should print type "QVariantMap" and method "toMap()" should be successful. Defect appears only on Apple devices, on other systems (Windows, Linux, Android) behaviour is correct.
QList <QSslCertificate> myCerts = QSslCertificate::fromPath(" path to .der", QSsl::Der);
if (!myCerts.empty())
for(auto it : myCerts[0].extensions())
if (it.name() == QLatin1String("subjectAltName"))
qDebug() << "extension " << it.oid() << " have " << it.value().toMap().count() << "elemnts and type " << it.value().typeName();
On Windows:
extension "2.5.29.17" have 2 elemnts and type QVariantMap
On MacOS:
extension "2.5.29.17" have 0 elemnts and type QByteArray
Qt Plugin "Qt OPC UA" uses method "toMap()", so I'm assuming that the Windows behaviour is correct.