5

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.

jww
  • 97,681
  • 90
  • 411
  • 885
Protomen
  • 9,471
  • 9
  • 57
  • 124

2 Answers2

3

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:

  • libeay32.dll
  • libssl32.dll
  • ssleay32.dll

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

Protomen
  • 9,471
  • 9
  • 57
  • 124
2

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,

ie if libXYZ.a is present in the directory add -lXYZ to your LIBS += statement.

Larry_C
  • 316
  • 1
  • 9