Download data only working with some sites
-
@jcga said in Download data only working with some sites:
qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiatedTo add to @Pablo-J-Rogina: It looks like your Qt has problems with the openssl library (problems resolving functions from that library). So downloading may only work for sites without encryption (HTTP).
-
Hi,
What version of OpenSSL are you using ?
With their 1.1 version they broke API/ABI compatibility. Qt 5.10 will have a backend for OpenSSL >= 1.1. Currently you have to use a 1.0* release. -
Thanks for your answers.
@Pablo J. Rogina
It seems that it works rather with "simple" pages than with more complex ones (perhaps related to the presence of javascript scripts?)- it works with e.g. http://phlam.univ-lille1.fr or https://www.lcf.institutoptique.fr
- it does not work with http://www.lkb.upmc.fr/ or with http://www.aps.org
@SGaist
"What version of OpenSSL are you using ?" I don't know. How to find it? -
@Pablo-J.-Rogina said in Download data only working with some sites:
You may want to add error checking to your fileDownloaded method to better understand what's going on
There is no error! But the QByteArray is empty.
-
What OS are you on ?
-
Then where did you get OpenSSL from ?
-
If you don't know then its likely that you don't have it at all.
If your downloads at some point get redirected to an encrypted endpoint then you need to have OpenSSL in order to establish the connection.
-
If you don't know then its likely that you don't have it at all.
If your downloads at some point get redirected to an encrypted endpoint then you need to have OpenSSL in order to establish the connection.
-
Yes it is wrong. Chrome comes packed with everything it needs like your application should be when using encryption.
-
Yes it is wrong. Chrome comes packed with everything it needs like your application should be when using encryption.
@SGaist OK, I made some progress. I found libraries 'libeay32.dll' and 'ssleay32.dll' in my Qt distribution. I copied them in the working dir of my project and the messages qt.network.ssl... etc disapeared. But now I'm getting an error "SSL handshake failed". Any suggestions ? Thanks a lot for your help.
-
@SGaist OK, I made some progress. I found libraries 'libeay32.dll' and 'ssleay32.dll' in my Qt distribution. I copied them in the working dir of my project and the messages qt.network.ssl... etc disapeared. But now I'm getting an error "SSL handshake failed". Any suggestions ? Thanks a lot for your help.
@jcga said in Download data only working with some sites:
Any suggestions ?
I already suggested "connect to the QNetworkAccessManager::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors) signal to check if something happens during TLS handshake."
-
@jcga said in Download data only working with some sites:
Any suggestions ?
I already suggested "connect to the QNetworkAccessManager::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors) signal to check if something happens during TLS handshake."
@Pablo-J.-Rogina
Thanks for the suggestion. I have done the connection, but the program never goes into the corresponding slot, so suppose that the signal sslErrors() is never emitted.