Weird Qt SSL issue -- error "No Error" shows up, nothing else, and if I ignore it, everything works

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"?

Answers


QSslSocket builds a NoError SslError only when translating an OpenSSL X509_V_OK error.

The OpenSSL documentation reports:

If no peer certificate was presented, the returned result code is X509_V_OK. This is because no verification error occurred, it does however not indicate success.

You should use tcpdump or a similar tool to check that certificates are correctly exchanged between peers.


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


Need Your Help

geocode_ip_address except specific controllers

ruby-on-rails ruby ruby-on-rails-3 geokit

I have added geocode_ip_address in ApplicationController so I can get the user location info from their session.

Programmatically Download Embedded SWFs from Sites?

ruby download flash

This is probably considered hacking, but is it possible to programmatically download swfs using something like Ruby? Not decompiling them, just downloading them so I can view them without having t...