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

Comparison of QSslCertificate broken (extensions() crashes)

    XMLWordPrintable

Details

    • All
    • 1759a797789b7907945ba46026a2c73ba7f010b9 (qt/tqtc-qtbase/tqtc/lts-5.15) f31997448838902eb5237b567f0c80f423f2406e (qt/tqtc-qtbase/6.1)

    Description

      Hi,

      we ugraded from Qt 5.12.5 to 5.15.2 and this example won't "work" anymore. Seems the comparison of QSslCertificate is broken here.

      • Qt 5.12.5 works
      • Qt 5.15.2 broken
      #include <QtNetwork/QSslCertificate>
      #include <QtCore/QDebug>
      
      int main()
      {
              const QByteArray data("-----BEGIN CERTIFICATE-----\nMIIDJTCCAg2gAwIBAgIUEUSW5o7qpgNCWyXic9Fc9tCLS0gwDQYJKoZIhvcNAQEL\nBQAwEzERMA8GA1UEAwwIUGVyc29TaW0wHhcNMjAxMjE2MDY1NjM5WhcNMzAxMjE2\nMDY1NjM5WjATMREwDwYDVQQDDAhQZXJzb1NpbTCCASIwDQYJKoZIhvcNAQEBBQAD\nggEPADCCAQoCggEBAMsgRKnnZbQtG9bB9Hn+CoOOsanmnRELSlGq521qi/eBgs2w\nSdHYM6rsJFwY89RvINLGeUZh/pu7c+ODtTafAWE3JkynG01d2Zrvp1V1r97+FGyD\nf+b1hAggxBy70bTRyr1gAoKQTAm74U/1lj13EpWz7zshgXJ/Pn/hUyTmpNW+fTRE\nxaifN0jkl5tZUURGA6w3+BRhVDQtt92vLihqUGaEFpL8yqqFnN44AoQ5+lgMafWi\nUyYMHcK75ZB8WWklq8zjRP3xC1h56k01rT6KJO6i+BxMcADerYsn5qTlcUiKcpRU\nb6RzLvCUwj91t1aX6npDI3BzSP+wBUUANBfuHEMCAwEAAaNxMG8wFwYDVR0OBBA8\nyBBnvz1Zt6pHm2GwBaRyMBcGA1UdIwQQPMgQZ789WbeqR5thsAWkcjAPBgNVHRMB\nAf8EBTADAQH/MAsGA1UdDwQEAwIChDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYB\nBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAIEzVbttOUc7kK4aY+74TANFZK/qtBQ7\n94a/P30TGWSRUq2HnDsR8Vo4z8xm5oKeC+SIi6NGzviWYquuzpJ7idcbr0MIuSyD\n+Vg6n1sG64DxWNdGO9lR5c4mWFdIajShczS2+4QIRB/lFZCf7GhPMtIcbP1o9ckY\n2vyv5ZAEU9Z5n0PY+abrKsj0XyvJwdycEsUTywa36fuv6hP3UboLtvK6naXLMrTj\nWtSA6PXjHy7h8h0NC8XLk64mc0lcRC4WM+xJ/C+NHglpmBqBxnStpnZykMZYD1Vy\nJJ1wNc+Y3e2uMBDxZviH3dIPIgqP1Vpi2TWfqr3DTBNCRf4dl/wwNU8=\n-----END CERTIFICATE-----");
      
              const QSslCertificate certificate1(data);
              const QSslCertificate certificate2(data);
      
              if (certificate1 == certificate2)
              {
                      qDebug() << "works";
                      return 0;
              }
      
              qDebug() << "broken";
              return 1;
      }
      

      Attachments

        Activity

          People

            tpochep Timur Pocheptsov
            misery André Klitzing
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: