Why is QsslSocket working with Qt 5.3 but not Qt 5.7 on Debian Stretch?
来源:互联网 发布:马云开创淘宝 编辑:程序博客网 时间:2024/05/18 05:52
原文地址: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:
QSslSocket: cannot resolve CRYPTO_num_locksQSslSocket: cannot resolve CRYPTO_set_id_callbackQSslSocket: cannot resolve CRYPTO_set_locking_callbackQSslSocket: cannot resolve ERR_free_stringsQSslSocket: cannot resolve EVP_CIPHER_CTX_cleanupQSslSocket: cannot resolve EVP_CIPHER_CTX_initQSslSocket: cannot resolve sk_new_nullQSslSocket: cannot resolve sk_pushQSslSocket: cannot resolve sk_freeQSslSocket: cannot resolve sk_numQSslSocket: cannot resolve sk_pop_freeQSslSocket: cannot resolve sk_valueQSslSocket: cannot resolve SSL_library_initQSslSocket: cannot resolve SSL_load_error_stringsQSslSocket: cannot resolve SSL_get_ex_new_indexQSslSocket: cannot resolve SSLv2_client_methodQSslSocket: cannot resolve SSLv3_client_methodQSslSocket: cannot resolve SSLv23_client_methodQSslSocket: cannot resolve SSLv2_server_methodQSslSocket: cannot resolve SSLv3_server_methodQSslSocket: cannot resolve SSLv23_server_methodQSslSocket: cannot resolve X509_STORE_CTX_get_chainQSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconfQSslSocket: cannot resolve OPENSSL_add_all_algorithms_confQSslSocket: cannot resolve SSLeayQSslSocket: cannot resolve SSLeay_versionQSslSocket: cannot call unresolved function CRYPTO_num_locksQSslSocket: cannot call unresolved function CRYPTO_set_id_callbackQSslSocket: cannot call unresolved function CRYPTO_set_locking_callbackQSslSocket: cannot call unresolved function SSL_library_initQSslSocket: cannot call unresolved function SSLv23_client_methodQSslSocket: 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 += network
is 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_methodQSslSocket: cannot resolve SSLv3_server_methodSSL 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 is QsslSocket working with Qt 5.3 but not Qt 5.7 on Debian Stretch?
- Why RequestContext is not working?
- Why is .innerText not working in Firefox?
- Why do I get "Value computed is not used" when working with pointers?
- Why VHD not working on my Kingston UFD
- 关于Qt中的 "stretch factor"
- Why Qt?
- $.ajax not working in chrome but is working in firefox and IE
- QT使用WebView提示QSslSocket错误
- Qt Qml 中Image的QSslSocket问题解决
- QT使用WebView提示QSslSocket错误
- PATH is different if login with same account but through different way on ubuntu(Not figure out yet)
- Android OnSensorChanged() not working when screen lock is on
- Process.start() is failed on run with special account...why?
- Call can throw but it is not marked with try
- nginx 交叉编译 ( checking for C compiler found but is not working )
- Qt:QML中,Warning: distance-field glyph is not available with index解决方法
- install centos6.4 into vmware, but network is not OK. Why?
- hdu4819 正宗二维线段树 区间求最值,单点跟新
- AC自动机详细讲解
- Maven+Mybatis+Spring+eclipse环境配置
- webservice
- 安装指定版本docker-engine
- Why is QsslSocket working with Qt 5.3 but not Qt 5.7 on Debian Stretch?
- 算法效能分析
- Hexo深度使用
- Error Curves
- Mapper配置之ResultMap详解
- 交错01串
- Excel 中多行时快速生成自增长序号
- Unity6--缩放、旋转、欧拉角
- Java基础——Servlet(四)