Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Fail to access https page with customer root CA on Mac
bobber last edited by
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";
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.
[EDIT: code formatting, please wrap in @-tags, Volker]
antonio last edited by
did you solved your problem? What did you did? I'm facing the same problem but at both Windos and linux