What is the correct way to use OpenSSL with Qt 6 and CMake for cross platform application?
-
Hello all!
What is the correct way to use OpenSSL with Qt 6 and CMake for cross platform application? Is there any examples or manuals? My application is for Desktop (Linux/MacOS) and for mobile (iOS/Android). A lot of manuals contain info about how to add to Android but nothing about other platforms.
Should it be added like static precompiled libs? Or it from Qt-inbox?
-
The part about Qt using OpenSSL is a HUGE clusterfuck where Qt "gives you hints" about not being able to use OpenSSL.
You'll see an error like
"qt.network.ssl: QSslSocket::startServerEncryption: TLS initialization failed"On Windows you have to yourself figure out what is the OpenSSL version that Qt might work with, whee to get the binaries (building it is a HUGE PITA and requires tools such as NASM, and half the sources don't even build) and where to place the crypto and openssl DLL files.
On Linux if you're using system packaged Qt it might just work out of the box (at least it has worked for me).