Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]SSL verification fails but the request continue !!!!
Forum Update on Monday, May 27th 2025

[SOLVED]SSL verification fails but the request continue !!!!

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 1.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mismail
    wrote on last edited by
    #1

    Hi guys,

    I am trying to use an api and i have been asked to be sure first that i am using our backend using ssl verification.

    so I used the following code
    @ QFile certFile("d:/backend.cer");
    Q_ASSERT(certFile.open(QIODevice::ReadOnly));
    qDebug()<< "is ssl supported? " << QSslSocket::supportsSsl();
    QByteArray certContent = certFile.readAll();

    QSslCertificate cert(certContent, QSsl::Der);
     
    kdebug() <<"Cert info: " << cert.effectiveDate() << cert.expiryDate() << cert.issuerInfo(QSslCertificate::Organization);
     
    QSslConfiguration sslConfig = request.sslConfiguration();
     
    sslConfig.setCaCertificates(QList<QSslCertificate>()<< cert);
    sslConfig.setPeerVerifyMode(QSslSocket::QueryPeer);
    request.setSslConfiguration(sslConfig);
    

    @

    I have two problems here
    1- The certificate is not verified and i always get the following response
    "ssl error = "The issuer certificate of a locally looked up certificate could not be found"
    ssl error = "The root CA certificate is not trusted for this purpose""

    2- However the ssl fails to verify the certificate it continues the request and receive the data!!!!

    Could any body please help?

    Regards,
    M.Ismail

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mismail
      wrote on last edited by
      #2

      Is there any body here?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mismail
        wrote on last edited by
        #3

        I fixed it. I should not igonre ssl errors

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved