Error Creating SSL Context - Qt
Solution 1
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.
Solution 2
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
Related videos on Youtube
Comments
-
adnan kamili over 1 year
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.
-
SteveTJS over 8 yearsI 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 over 8 yearsAnd I don't have libssl32.dll but a libssl.dll which is not in Qt installation folder like the two other files.
-
adnan kamili over 8 years@SteveTJS you need to download the dlls from the link provided. The ones provided with qt won't work.
-
Damir Porobic almost 5 yearsWhere do you find libssl32.dll under this link? The other two seem to be there but libssl32.dll is missing.
-
Violet Giraffe almost 5 years@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
andssleay32.dll
is all Qt Network needs. -
Damir Porobic almost 5 yearsCame 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.
-
Metafaniel over 4 yearsI tried this and all other suggestions here and in the other question referred above but nothing... nada... Any other ideas to overcome this?