Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.5.5
-
Ubuntu 22.04.3, kernel 6.5.0-26-generic
Description
We have a self-signed ca certificate installed in Windows, macOS and Ubuntu, on Ubuntu the self-signed ca cert is install in /etc/ssl/certs/ca-certificates.crt.
These code snippet below works fine on both Windows and macOS, but doesn't work on Ubuntu 22.04.3 with kernel 6.5.0-26-generic. In order to work for Ubuntu, it have to load the ca bundle usingĀ QSslCertificate::fromPath, and set a new QSslConfiguration for QNetworkRequest.
m_url = "https://self-signed-https-domain/path" QNetworkRequest request(m_url); // uncomments these 4 lines below on Ubuntu //QList<QSslCertificate> certs = QSslCertificate::fromPath("/etc/ssl/certs/ca-certificates.crt"); //QSslConfiguration config = QSslConfiguration(); //config.addCaCertificates(certs); //request.setSslConfiguration(config); m_reply = manager->post(request, params.toUtf8());
The QSslConfiguration::defaultConfiguration() method doesn't load the default system ca bundle too.