Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Fail to access https page with customer root CA on Mac
Forum Updated to NodeBB v4.3 + New Features

Fail to access https page with customer root CA on Mac

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 2 Posters 2.7k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bobber
    wrote on last edited by
    #1

    Hi guys,

    I have a website that uses the certificate issued by customer self-signed root CA. I installed customer self-signed root CA in keychain system roots and made it trust on Mac. I can open the https website by safari. Safari display that website use right certificate. However, I always gets following ssl error to access https pages with qwebview::load():
    SSL error: The issuer certificate of a locally looked up certificate could not be found; error code: 11
    SSL error: The root CA certificate is not trusted for this purpose; error code: 17
    SSL error: No certificates could be verified; error code: 12

    Same code works well on windows if I added customer self-signed root CA in trusted root Certification Authorities.

    I also tried to add customer root CA to sslSocket default CA certificates list as following:

    @
    QString strCA = qApp->getInstallFolder() + QDir::separator() + "ca.crt";
    if (QFile::exists(strCA))
    {
    logger.log(SHELL, "info", "Add custom CA certifiacate.");
    QList<QSslCertificate> CAcerts = QSslCertificate::fromPath(strCA);

    QSslSocket::setDefaultCaCertificates(CAcerts); // line A
    }
    @

    It doesn't work, and I still get same ss errors.

    I use qt 4.7.4. I tried to compile qt with openssl-linked and without openssl-linked both, same ssl error.

    Any suggestion?

    Thanks,
    Bobber

    [EDIT: code formatting, please wrap in @-tags, Volker]

    1 Reply Last reply
    0
    • A Offline
      A Offline
      antonio
      wrote on last edited by
      #2

      Hi,
      did you solved your problem? What did you did? I'm facing the same problem but at both Windos and linux

      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