Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.0, 5.5.1
-
None
-
Linux X11
-
63cf5d3d26a6f65938c3cdec1734eac9faaaf8cb
Description
Any CA certificates are removed:
QList<QSslCertificate> certificates;
QSslConfiguration config = QSslConfiguration::defaultConfiguration();
config.setProtocol(QSsl::TlsV1);
config.setCaCertificates(certificates);
QSslConfiguration::setDefaultConfiguration(config);
A QWebView is instantiated:
QWebView *browserWebView = new QWebView(this);
browserWebView->show();
QNetworkAccessManager *network = new QNetworkAccessManager();
browserWebView->page()->setNetworkAccessManager(network);
connect(network, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
SLOT(sslErrorsMethod(QNetworkReply*,QList<QSslError>)));
browserWebView->load(QUrl("https://.....")); #a page wich contains multiple images from different https site's
void MainWindow::sslErrorsMethod(QNetworkReply *reply,QList<QSslError> list)
{
for(int i=0;i<list.size();i++)
if (config.peerCertificate().isNull())
qDebug("--------------sslErrorsMethod: peer certificate is null!!!");
sleep(2);
}
This is the output:
SSL Errors
The issuer certificate of a locally looked up certificate could not be found
The root CA certificate is not trusted for this purpose
--------------sslErrorsMethod: peer certificate is null!!!
SSL Errors
The issuer certificate of a locally looked up certificate could not be found
The root CA certificate is not trusted for this purpose
SSL Errors
The issuer certificate of a locally looked up certificate could not be found
The root CA certificate is not trusted for this purpose
--------------sslErrorsMethod: peer certificate is null!!!
It is pretty random, sometimes is ok sometimes is not.
NOT OK means to have a NULL certificate in replay when sslError slot is called
Thank you