14

I tried everything mentioned in this Question

but nothing worked. The binary works fine on Windows 64-bit, but almost always shows the error

Error Creating SSL Context()

on Windows 32-bit. I tried the demo http client example.

Community
  • 1
  • 1
adnan kamili
  • 7,575
  • 5
  • 50
  • 105

2 Answers2

11

At last, I found the solution. I was downloading dll's from a dll website. You need to take these libraries

- libeay32.dll
- libssl32.dll
- ssleay32.dll

from this website here Win32 OpenSSL v1.0.2 file for 32 bit if you are using MSVC++ compiler

After installation of the above binary, copy the above three dll's in the the directory containing your binary file.

adnan kamili
  • 7,575
  • 5
  • 50
  • 105
  • I have the same problem. By copying those files in the .exe directory, it works for a 32bits application but not for a 64bits one. How to solve that? – SteveTJS Nov 30 '15 at 15:19
  • And I don't have libssl32.dll but a libssl.dll which is not in Qt installation folder like the two other files. – SteveTJS Nov 30 '15 at 15:34
  • @SteveTJS you need to download the dlls from the link provided. The ones provided with qt won't work. – adnan kamili Nov 30 '15 at 15:56
  • I tried this and all other suggestions here and in the other question referred above but nothing... *nada*... Any other ideas to overcome this? – Metafaniel Jul 24 '19 at 21:37
11

I recommend this source for OpenSSL Windows binaries. These binaries have no external dependencies and tested with 32-bit and 64-bit Qt5.

Update: OpenSSL 1.0 and 1.1 are not binary- and API-compatible. As of Qt 5.12 (certainly 5.12.4) version 1.1 seems the default OpenSSL backend in Qt, although I hear it can be configured to keep using 1.0. I'm testing this source for Windows OpenSSL 1.1 builds, no problems so far: https://bintray.com/vszakats/generic/openssl

Violet Giraffe
  • 29,070
  • 38
  • 172
  • 299
  • Where do you find libssl32.dll under this link? The other two seem to be there but libssl32.dll is missing. – Damir Porobic Jul 13 '19 at 16:24
  • 2
    @DamirPorobic: don't know what's that, I only ever needed the two libraries that are present. In fact, I ran a search across my whole disk C: and there is not a single `libssl32.dll` found, so it doesn't seem I have any software installed that requires it. `libeay32.dll` and `ssleay32.dll` is all Qt Network needs. – Violet Giraffe Jul 13 '19 at 18:01
  • Came today to the same conclusion. Had libeay32.dll and ssleay32.dll all over the place and only using those two seems to fix the issue. – Damir Porobic Jul 14 '19 at 13:53