c++windowsqtopensslqnetworkrequest

How to configure OpenSSL on the QT


How can I make my QwebView/QNetWorkRequest work with SSL?

QT return this errors (is clear that the error occurs because I did not configure SSL in my application):

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

I am use Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL) - my window is 64bit

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.

I install openSslWin32 (my Windows is 64bit, but my application is 32bit), I try this:

pro file:

LIBS += -LC:/OpenSSL-Win32/lib -lubsec
INCLUDEPATH += C:/OpenSSL-Win32/include

cpp file:

#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.


Solution

  • I am install OpenSSL 32bit, is now working.

    Download precompiled for Windows:

    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:

    Note: No need to add anything to "LIBS +="