[英]How to configure OpenSSL on the QT
How can I make my QwebView/QNetWorkRequest work with SSL ? 如何让我的QwebView / QNetWorkRequest使用SSL ?
QT return this errors (is clear that the error occurs because I did not configure SSL in my application): QT返回此错误(很明显错误发生是因为我没有在我的应用程序中配置SSL):
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf QSslSocket: cannot call unresolved function OPENSSL_add_all_algorithms_conf
QSslSocket:无法解析OPENSSL_add_all_algorithms_noconf QSslSocket:无法解析OPENSSL_add_all_algorithms_conf QSslSocket:无法调用未解析的函数OPENSSL_add_all_algorithms_conf
I am use Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL) - my window is 64bit 我使用Qt 5.1.1 for Windows 32位(MinGW 4.8,OpenGL) - 我的窗口是64位
I'll be honest, I have no idea where to start. 老实说,我不知道从哪里开始。 I searched but have not found anywhere that shows how trabalar SSL with QNetWorkRequest .
我搜索过但没有找到任何显示带有QNetWorkRequest的 trabalar SSL的地方 。
I install openSslWin32 (my Windows is 64bit, but my application is 32bit), I try this: 我安装openSslWin32(我的Windows是64位,但我的应用程序是32位),我试试这个:
pro file: 专业档案:
LIBS += -LC:/OpenSSL-Win32/lib -lubsec
INCLUDEPATH += C:/OpenSSL-Win32/include
cpp file: cpp文件:
#include <openssl/aes.h>
But continues to show errors. 但继续显示错误。
I know it is missing something, but do not know what exactly, forgive me I'm beginner. 我知道它遗漏了什么,但不知道到底是什么,原谅我,我是初学者。
I am install OpenSSL 32bit, is now working. 我安装OpenSSL 32bit,现在正在工作。
Download precompiled for Windows: 下载预编译的Windows:
http://slproweb.com/products/Win32OpenSSL.html http://slproweb.com/products/Win32OpenSSL.html
Downloads: 下载:
After install copy DLLs (from C:\\OpenSSL-Win32
or C:\\OpenSSL-Win64
, depends on whether you will compile with Qt 32bit or Qt 64bit) for release
or debug
project folder: 对于
release
或debug
项目文件夹,安装复制DLL(来自C:\\OpenSSL-Win32
或C:\\OpenSSL-Win64
,取决于是否将使用Qt 32位或Qt 64位编译):
Note: No need to add anything to "LIBS +="
注意:无需向“LIBS + =”添加任何内容
You may be missing a bunch of libraries. 你可能会错过一堆库。
Go into C:/OpenSSL-Win32/lib and find out which 32 bit libraries are present and add them all to your link line, 进入C:/ OpenSSL-Win32 / lib,找出存在的32位库,并将它们全部添加到链接行,
ie if libXYZ.a is present in the directory add -lXYZ to your LIBS += statement. 即如果目录中存在libXYZ.a,则将-lXYZ添加到LIBS + =语句中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.