QNetwork problems with SSL, any fix or alternatives?
-
Hi.
I am revisiting an old application i was developing, and it seems that QNetwork is broken (code used to work). Now i get a lot of SSL problems. I only need to download the html code of https webpages and also be able fetch images..
I am not sure whether i should try and fix these problems or search for an alternative lightweight library that i could include and would work with both Linux and WIndows, considering GNU Licence 3
Windows:
To fix i had to add libcrypto-1_1-x64.dll and libssl-1_1-x64.dll on the debug folderUbuntu 22:04:
Qt 5.11.3 (doesn't find OpenSSL installed)qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init qt.network.ssl: QSslSocket: cannot resolve sk_new_null qt.network.ssl: QSslSocket: cannot resolve sk_push qt.network.ssl: QSslSocket: cannot resolve sk_free qt.network.ssl: QSslSocket: cannot resolve sk_num qt.network.ssl: QSslSocket: cannot resolve sk_pop_free qt.network.ssl: QSslSocket: cannot resolve sk_value qt.network.ssl: QSslSocket: cannot resolve SSL_library_init qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings qt.network.ssl: QSslSocket: cannot resolve SSL_get_ex_new_index qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf qt.network.ssl: QSslSocket: cannot resolve SSLeay qt.network.ssl: Incompatible version of OpenSSL
Qt 5.15.2 (finds OpenSSL 3.0.2 installed)
qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate
-
Hi,
5.11 was released before OpenSSL 3 even existed.
AFAIR, the support for OpenSSL 3 might have been backported to Qt 5.15 but after 5.15.2.
If you want to use Qt 5, I would recommend you use the version provided with your distribution. It should have everything needed to work with the OpenSSL version distributed.
-
@SGaist said in QNetwork problems with SSL, any fix or alternatives?:
If you want to use Qt 5, I would recommend you use the version provided with your distribution. It should have everything needed to work with the OpenSSL version distributed.