how can I enable SSL in QT windows application?

So after long time I figured what the problem is:

These 2 libraries need to be in same folder as your executable OR in windows system folder (system32 I think):

libeay32.dll
ssleay32.dll

You will find them in \bin of your OpenSSL folder, since I copied these 2 libs there it works

IMPORTANT: When deploying to client computers, it's also necessary to install vcredist package that was used to compile these .dll which may differ from vcredist package needed to run the application itself. vcredist version depends on version of the libraries.


You have to add OpenSSL lib in your project. In windows Qt doesn't come with OpenSSL lib. (I think it's a legal issue). You can find OpenSSL developer libs in URI you posted. If you are compiling against 32bit framework, what you need to download is Win32 OpenSSL v1.0.1e

This is what I have in my project.

QT += core gui network
win32{
    LIBS += -LC:/OpenSSL-Win32/lib -lubsec
    INCLUDEPATH += C:/OpenSSL-Win32/include
}

Tags:

C++

Ssl

Qt