Why is QsslSocket working with Qt 5.3 but not Qt 5.7 on Debian Stretch?
2017-08-20 16:52
429 查看
原文地址:https://stackoverflow.com/questions/42094214/why-is-qsslsocket-working-with-qt-5-3-but-not-qt-5-7-on-debian-stretch
方便以后查找,复制过来
question:
I have an app that uses the
QWebSocket class but not SSL. It works fine when I execute a version compiled with Qt 5.3 but a Qt 5.7 executable freezes on the following warnings:
I am not seeing these warnings in the 5.3 version (that works properly), which suggests that I should not ignore them, as asked in this question. Also,
I was led to believe that Debian dropped these symbols from the openssl package. Could anyone tell me what's going on here and how I could fix this?
大神的回答:
From this
answer about OpenSSL and Qt, I found a hint and I displayed SSL library version used for compile-time and run-time using:
And it displays:
But Debian Stretch is shipped with OpenSSl 1.1. As expected, all the threads on the Web about this issue are true: this is an OpenSSL library version compatibility issue.
I "apt install libssl1.0-dev" and the problem was solved. I still have 2 SSL warnings about SSLv3, but at least this is only warning (I read something on the Web about it, no way to find it again).
方便以后查找,复制过来
question:
I have an app that uses the
QWebSocket class but not SSL. It works fine when I execute a version compiled with Qt 5.3 but a Qt 5.7 executable freezes on the following warnings:
QSslSocket: cannot resolve CRYPTO_num_locks QSslSocket: cannot resolve CRYPTO_set_id_callback QSslSocket: cannot resolve CRYPTO_set_locking_callback QSslSocket: cannot resolve ERR_free_strings QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup QSslSocket: cannot resolve EVP_CIPHER_CTX_init QSslSocket: cannot resolve sk_new_null QSslSocket: cannot resolve sk_push QSslSocket: cannot resolve sk_free QSslSocket: cannot resolve sk_num QSslSocket: cannot resolve sk_pop_free QSslSocket: cannot resolve sk_value QSslSocket: cannot resolve SSL_library_init QSslSocket: cannot resolve SSL_load_error_strings QSslSocket: cannot resolve SSL_get_ex_new_index QSslSocket: cannot resolve SSLv2_client_method QSslSocket: cannot resolve SSLv3_client_method QSslSocket: cannot resolve SSLv23_client_method QSslSocket: cannot resolve SSLv2_server_method QSslSocket: cannot resolve SSLv3_server_method QSslSocket: cannot resolve SSLv23_server_method QSslSocket: cannot resolve X509_STORE_CTX_get_chain QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf QSslSocket: cannot resolve SSLeay QSslSocket: cannot resolve SSLeay_version QSslSocket: cannot call unresolved function CRYPTO_num_locks QSslSocket: cannot call unresolved function CRYPTO_set_id_callback QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function sk_num
I am not seeing these warnings in the 5.3 version (that works properly), which suggests that I should not ignore them, as asked in this question. Also,
QT += networkis already in my src.pro.
I was led to believe that Debian dropped these symbols from the openssl package. Could anyone tell me what's going on here and how I could fix this?
大神的回答:
From this
answer about OpenSSL and Qt, I found a hint and I displayed SSL library version used for compile-time and run-time using:
qDebug()<<"SSL version use for build: "<<QSslSocket::sslLibraryBuildVersionString(); qDebug()<<"SSL version use for run-time: "<<QSslSocket::sslLibraryVersionNumber(); qDebug()<<QCoreApplication::libraryPaths();
And it displays:
SSL version use for build: "OpenSSL 1.0.1e-fips 11 Feb 2013" ... lot of SSL warnings... SSL version use for run-time: 0 ("/opt/Qt/5.8/gcc_64/plugins", "/home/Project/..../build...Desktop_Qt_5_8_0_GCC_64bit-Release/src/release/build_linux_64")
But Debian Stretch is shipped with OpenSSl 1.1. As expected, all the threads on the Web about this issue are true: this is an OpenSSL library version compatibility issue.
I "apt install libssl1.0-dev" and the problem was solved. I still have 2 SSL warnings about SSLv3, but at least this is only warning (I read something on the Web about it, no way to find it again).
SSL version use for build: "OpenSSL 1.0.1e-fips 11 Feb 2013" QSslSocket: cannot resolve SSLv3_client_method QSslSocket: cannot resolve SSLv3_server_method SSL version use for run-time: 268443839 ("/opt/Qt/5.8/gcc_64/plugins", "/home/Project/..../build...Desktop_Qt_5_8_0_GCC_64bit-Release/src/release/build_linux_64")
相关文章推荐
- Why do I get "Value computed is not used" when working with pointers?
- configure: error: --with-ssl=openssl was given, but SSL is not available.
- anaconda2下面安装opencv2.4.13.4完成----解决默认安装的问题----Thefunction is not implemented. Rebuild the library with Windows, GTK+ 2.x orCarbon support. If you are on Ubuntu or Debian, install libgtk2.0‑dev and pkg
- configure: error: --with-ssl was given, but GNUTLS is not available.
- (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
- logstash 安装WARNING: SSLSocket#session= is not supported
- Qt:QML中,Warning: distance-field glyph is not available with index解决方法
- Trouble with the private key for “myName” is not installed on this mac
- (error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on d
- FTP not working on Java 7 on Windows 7 and VISTA when Windows Firewall is enabled
- File is universal (three slices), but it does not contain a(n) ARMv7-s slice error for static libraries on iOS, anyway to bypass?
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on di
- logstash 安装插件慢 WARNING: SSLSocket#session= is not supported
- Vue报错笔记(1)vue.js:515 [Vue warn]: Property or method "name" is not defined on the instance but refere
- Python 出现错误 SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform.
- 安装springboot时遇到 LoggerFactory is not a Logback LoggerContext but Logback is on the classpath.问题
- 【RAC搭建报错】PRVF-5507 : NTP daemon or service is not running on any node but NTP configuration file exists on the following node(s): rac02,rac01