The issue is as follows : in my Qt app, I have a QWebView, which I use to load a HTTPS page.
Everything worked fine on my development machine, so I'm now trying to get it to run on a test machine. I ran the app, but the page didn't load (the QWebView was blank). After much debugging, I found the problem is that an SSL error shows up, and the sslErrors() signal is fired.
Here is my sslErrors() handling code:
void blah::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors) {
foreach(QSslError error, errors) {
qDebug() << error.errorString() << endl;
}
reply->ignoreSslErrors();
}
The only thing the above code prints is:
"No error"
So there's no error, but unless I call reply->ignoreSslErrors()
, the page doesn't load (on the test machine, on my developer computer no error is reported). Huh? Is this a bug?
Is it safe to ignore the error, if I make sure it's of the type "No error"?
You may be hitting QTBUG-28343 which is due to a binary incompatibility in openssl between the version your Qt was compiled against and the one you are running. This will be fixed in Qt 4.8.5.
http://lists.qt-project.org/pipermail/announce/2013-January/000020.html https://bugreports.qt-project.org/browse/QTBUG-28343
QSslSocket builds a NoError SslError only when translating an OpenSSL
X509_V_OK
error.The OpenSSL documentation reports:
You should use tcpdump or a similar tool to check that certificates are correctly exchanged between peers.