Solved QNetworkAccessManager to a HTTPS troubles
-
1/ In Qt creator it says
Based on Qt 5.12.0 (MVSC 2015, 32 bit)
2/ From herehttp://slproweb.com/products/Win32OpenSSL.html
3/QSslSocket::sslLibraryBuildVersionString()
returnsOpenSSL 1.0.2p 14 Aug 2018
4/QSslSocket::sslLibraryVersionString()
returns emptyAnd yes, i made sure to close all the dialog windows before restarting Qt.
-
@kshegunov My test code is pretty bare right now, i just wanted to see how it worked first, it is just a simple
QNetworkAccessManager::get
onhttps://www.google.com
. -
It works yes, if it's configured properly. However:
QSslSocket::sslLibraryVersionString()
shouldn't return empty. I'd guess Qt can't find to load your openssl library. -
Hi,
Following item 3, Qt was built using OpenSSL 1.0.2 so you have to download the most recent version of the 1.0 series of OpenSSL. You can't use 1.1 in this case because they broke API and ABI compatibility.
-
@SGaist Installed 1.0.2q and still the same,
QSslSocket::sslLibraryVersionString()
returns empty. I am loosing hope :( -
Go to the Run part of the Project panel and modify the PATH environment variable there to also contain the path to your 1.0 version of OpenSSL dlls.
-
@SGaist Sadly it is already there, even twice for some reason.
-
Then I would ensure that this folder is the first to appear in the list and also that there are no other versions of OpenSSL on the system, for example in the Windows specific folders.
-
@SGaist Alright it is working now, i indeed needed to install the 64bit version and not the 32 bit:
QSslSocket::sslLibraryBuildVersionString() "OpenSSL 1.0.2p 14 Aug 2018" QSslSocket::sslLibraryVersionString() "OpenSSL 1.0.2q 20 Nov 2018"
I also received the result from
QNetworkAccessManager::get
Thanks a lot for all the help, you guys are awesome.
Edit: i still always have this in the output console though
QNetworkReplyHttpImplPrivate::_q_startOperation was called more than once
but it is not related to this because i had it on non secure get too. -
The message will be gone in 5.12.2. See QTBUG-72463
-
I'm glad to hear that it's working for you now!
@reonZ said in QNetworkAccessManager to a HTTPS troubles:
3/ QSslSocket::sslLibraryBuildVersionString() returns OpenSSL 1.0.2p 14 Aug 2018
Apologies, I gave you wrong information earlier. This result shows that Qt was built against OpenSSL 1.0.2, not 1.1.0.