Qt World Summit: Submit your Presentation

Adding OpenSSL to project

  • Hello,
    I'm trying to build my project for Windows. On Linux everything works fine, but under Windows the following error occurs:

    qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed

    When I install OpenSSL before installing my software everything works fine, but I don't want others to install it manually. How can I include OpenSSL in my project? I already tried to add some recommended .dll files but nothing worked yet. I'm using MinGW to deploy my project, I would really appreciate help because I am very new to this...

  • Moderators

    the runtime linker must be able to find the openssl libs/dlls.
    For example in the PATH environment variable, or directly next to your application exe.

  • After building the release I added "libeay32.dll" and "ssleay32.dll" next to the exe file, but it still doesn't work. Do I have to do anything else?

  • Moderators

    what Qt version are you using. The libs u copied are OpenSSL v1.0.x
    You might need to copy the OpenSSL v1.1.x libs

Log in to reply