QML Image: TLS initialization failed
-
You need to use OpenSSL in your project - link OpenSSL libs with your application and it should start working.
Some docs:
-
You need to use OpenSSL in your project - link OpenSSL libs with your application and it should start working.
Some docs:
-
Yes, well there isn't any installed OpenSSL library on Windows :D
-
@qcoderpro said in QML Image: TLS initialization failed:
But I've installed OpenSSL using Qt!
But it's not a system-wide installation.
You mean I can't load an image from the Internet on Windows!?
You can. Just link OpenSSL to your project, or place OpenSSL DLLs close to the .exe.
-
@qcoderpro said in QML Image: TLS initialization failed:
But I've installed OpenSSL using Qt!
But it's not a system-wide installation.
You mean I can't load an image from the Internet on Windows!?
You can. Just link OpenSSL to your project, or place OpenSSL DLLs close to the .exe.
-
- find where your OpenSSL installation is
- in your .pro file (I assume you're using qmake), add:
LIBS+=path/to/openssl/libs INCLUDEPATH+=path/to/openssl/include
-
- find where your OpenSSL installation is
- in your .pro file (I assume you're using qmake), add:
LIBS+=path/to/openssl/libs INCLUDEPATH+=path/to/openssl/include
I've installed both x64 and x86 versions of openssl but the kit I'm using to run the project is x64 so I add:
C:\Qt\Tools\OpenSSL\Win_x64\lib
But I'm using CMake. Can I add these two lines just like the .pro file of qmake in it?
LIBS += C:\Qt\Tools\OpenSSL\Win_x64\lib // (There's no 'libs' folder in the openssl directory) INCLUDEPATH += C:\Qt\Tools\OpenSSL\Win_x64\include
-
For cmake, you should use
FindOpenSSL
: https://cmake.org/cmake/help/latest/module/FindOpenSSL.html -
For cmake, you should use
FindOpenSSL
: https://cmake.org/cmake/help/latest/module/FindOpenSSL.html -
Hi,
Which version of OpenSSL are you using ?
-
That's the minimal cmake version required to build the project.
As for OpenSSL, the installer might tell you this.
The headers of the library. -
That's the minimal cmake version required to build the project.
As for OpenSSL, the installer might tell you this.
The headers of the library.As for OpenSSL, the installer might tell you this.
The headers of the library.Or use QSslSocket::sslLibraryVersionString.
How to use it in my QML project?
I used it this way but that doesn't work!Component.onCompleted: { console.log(QSslSocket::sslLibraryVersionString) }
-
@qcoderpro said in QML Image: TLS initialization failed:
QSslSocket::sslLibraryVersionString
Use it in you main.cpp.
-
@qcoderpro said in QML Image: TLS initialization failed:
QSslSocket::sslLibraryVersionString
Use it in you main.cpp.
I included these two header files:
#include <iostream> #include <QSslSocket>
and this line in main.cpp:
std::cout<< "The openSSL version is: " << QSslSocket::sslLibraryVersionString << '\n'
In return I get this warning in the Issues window and nothing related to what I foresee in Application/Compile Output windows!
warning: address of function 'QSslSocket::sslLibraryVersionString' will always evaluate to 'true'
-
QSslSocket::sslLibraryVersionString
is a static function that you have to call. -
Except it should be the j release. You should ensure that this is the one used by your application.
-
Except it should be the j release. You should ensure that this is the one used by your application.
You mean I have two files/packs installed as openSSL, one with
f
release and the other withj
and thatf
release is what QtCreator is using!? So what is the problem with thatf
release the IDE is using and why can't it run the program by that properly?Or probably there's a conflict between the two releases and I need to uninstall one to run the app properly! :(
But how?