QNetworkAccessManager to a HTTPS troubles
-
@reonZ said in QNetworkAccessManager to a HTTPS troubles:
I did put it in my windows PATH, tried both the
C:\OpenSSL-Win32\bin
andC:\OpenSSL-Win64\bin
version just in case and i still have the same error- Are you using 32-bit or 64-bit Qt?
- Where did you download OpenSSL from?
- What does
QSslSocket::sslLibraryBuildVersionString()
return? - What does
QSslSocket::sslLibraryVersionString()
return?
(i restarted Qt each time).
I'm not 100% sure, but you'll also need to make sure that Windows has recorded the changes. Did you close all the Windows dialogs after changing the settings?
-
Relevant bugreports:
https://bugreports.qt.io/browse/QTBUG-72015
https://bugreports.qt.io/browse/QTBUG-72016Basically you can get that if you have misconfigured the socket - no private key, or local certificate. The error is nondescriptive, so you need to make sure (if you use any of those two) that both exist and are valid, and you do that manually. Could you provide the snippet you use to connect to said server?
-
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.
-
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.
-
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.
-
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.