SSL error when downloading files with url
-
I'm creating code to download files via http/https url but it's always OpenSSL error I don't know how to solve it, this is the source code I'm using https://wiki.qt.io/Download_Data_from_URL .
error
qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
I am using the final QT 5 version (5.15.2)
-
If you try the Secure Socket Client Example (one of the example apps in Qt 5.15.2), you get the same error?
@hskoglund QTCPSocket ? like it's not
-
-
-
Things that can be wrong:
- OpenSSL not found or not loadable.
- Server is presenting an invalid, expired, revoked, or self-signed certificate.
- Server is presenting a valid certificate for which the client does not have the certificate trust chain.
- OpenSSL version does not support matching protocol/ciphers to the server. Fo example, the server is forcing TLS 1.3 and your client side does not do TLS 1.3.
The QNetworkAccessManager::sslErrors() signal could be your friend.
-
@Blackzero said in SSL error when downloading files with url:
@SGaist I installed it from the Maintenance Tool. it looks like OpenSSL V3.
Qt 5.15.2 does not support OpenSSL 3.
You have to build the latest Qt 5.15 yourself if you want to use that version. -
@Blackzero said in SSL error when downloading files with url:
@SGaist I installed it from the Maintenance Tool. it looks like OpenSSL V3.
Qt 5.15.2 does not support OpenSSL 3.
You have to build the latest Qt 5.15 yourself if you want to use that version. -
Did you check that the dlls are found and loaded by your application ?