When a network component using QT connects to some servers, a "qt.network.ssl:QSslSocket:cannot resolve Sslv2_client_method" error is prompted, causing the connection to fail.
It was found that this is due to the SSLv2 due to some of the vulnerabilities caused by the security reasons, in some Linux distributions disabled SSLv2.
The solution is to recompile OpenSSL yourself, plus SSLv2 support
1. Download the code:
git clone https://github.com/openssl/openssl.git
2. Compiling
My test result is that openssl1.1 doesn't work, but openssl1.0 works
git checkout openssl_1_0_0-stable. /config enable-shared make depend make-j4
3. Copy compilation results to $qtdir/lib, my directory is /opt/qt5.7.0/5.7/gcc_64/lib/
sudo CP libcrypto.so libssl.so libcrypto.so. 1.0. 0 libssl.so. 1.0. 0 /opt/qt5.7.0/5.7/gcc_64/lib/
4. From the new application, Qt Pulgin will automatically load symbols from the newly compiled SSL libries
At this point you will still get some warning, such as
Qt.network.ssl:QSslSocket:cannot Resolve TLSv1_1_client_methodqt.network.ssl:QSslSocket:cannot Resolve tlsv1_2_ Client_methodqt.network.ssl:QSslSocket:cannot Resolve TLSv1_1_server_methodqt.network.ssl:QSslSocket:cannot Resolve TLSv1_2_server_methodqt.network.ssl:QSslSocket:cannot Resolve SSL_select_next_protoqt.network.ssl: Qsslsocket:cannot Resolve SSL_CTX_set_next_proto_select_cbqt.network.ssl:QSslSocket:cannot Resolve Ssl_get0_next_ Proto_negotiate
You can ignore it.
Resolve the "Qt.network.ssl:QSslSocket:cannot resolve Sslv2_client_method" error that QT5 uses SSL