Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86830

2.5.29.17 - "Subject Alternative Name" is readed as "QByteArray" instead of "QVariantMap"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.14.2, 5.15.0, 5.15.1
    • Network: SSL
    • None
    • iOS/tvOS/watchOS, macOS
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            pawelw Pawel Wisniewski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes