-
@artwaw
Hello,you were talking about 2 libraries I am assuming you are talking about these? this is what I got when I downloaded the openSSL 1.1.1j toolkit (in the Maintenance tool)
"All you need to do is copy them over": in QTcreator it works but if I copy them over in my executable folder It does not work anymore and I get the qt.network.ssl: No functional TLS backend was found error when I run with the debugger.
kind regards
Yina -
@Yina said in Is it possible to have "Best of both worlds" within Qt versions regarding modules?:
But I am fairly new to this so if I am doing it the wrong way could you please help me to get into the right direction.
As @artwaw wrote before, it depends on how you did install Qt 6.2:
- did you compile yourself from sources?
- did you install the beta version with Maintenance Tool?
If you compile it yourself, you will have to reconfigure/compile/install.
When using Qt Maintenance Tool you will have nothing to do, apart copy dll from <QT_INSTALL_DIR>/Tools/OpenSLL/Win_XXX/bin into <QT_INSTALL_DIR>/6.2/<qt_kit>/bin -
@KroMignon
HelloI installed via the Maintenance tool, so then I copied the libcrypto-1_1-x64 in my MSVC2019 bin directory:
After that I proceeded to make an executabele so I deployed my project and ran windeployqt.exe
PATH \debug> C:\Qt\6.2.0\msvc2019_64\bin\windeployqt.exe --qmldir C:\Users\yina\OneDrive\documtents\Qt\Project .
When I ran through my files in the executable folder I saw that the libcrypto-1_1-x64.dll and libssl-1_1-x64.dll weren't in that said folder. I believe that is because of international laws.
So I manually copied the 2 files from the bin folder
then I tested and the program is still not able to do an HTTPS request.
Then I ran with the debugger tool with an external executable and I saw that I still get the error like I said above.
qt.network.ssl: No functional TLS backend was found, qt.network.ssl: No TLS backend is available.Kind regads
Yina -
@Yina said in Is it possible to have "Best of both worlds" within Qt versions regarding modules?:
qt.network.ssl: No functional TLS backend was found, qt.network.ssl: No TLS backend is available.
Just for testing purpose, could you add "C:\Qt\Tools\OpenSSL\Win_x64\bin" the PATH and the try to start your application?
Do this work? -
@KroMignon said in Is it possible to have "Best of both worlds" within Qt versions regarding modules?:
hello
I did that but the thing is it always works in the qt creator but if I make an executable is won't work anymore, so I made an executable via windeployqt.exe with "C:\Qt\Tools\OpenSSL\Win_x64\bin" added through the path and it still does not work.And I still get the same errors.The application starts but I can't do an HTTPS request.
kind regards
Yina -
@Yina said in Is it possible to have "Best of both worlds" within Qt versions regarding modules?:
hello
I did that but the thing is it always works in the qt creator but if I make an executable is won't work anymore, so I made an executable via windeployqt.exe with "C:\Qt\Tools\OpenSSL\Win_x64\bin" added through the path and it still does not work.And I still get the same errors.The application starts but I can't do an HTTPS request.
kind regards
YinaCould you add some debug information to help to understand what's happening:
qDebug() << "SSL support:" << QSslSocket::supportSsl(); qDebug() << "SSL version required:" << QSslSocket::sslLibraryBuildVersionString(); qDebug() << "SSL version found:" << QSslSocket::sslLibraryVersionString();
-
@KroMignon said in Is it possible to have "Best of both worlds" within Qt versions regarding modules?:
Hello
//executable the thing I want that works
SSL support: false
SSL version required: ""
SSL version found: ""//qtCreator so not the executable
SSL support: true
SSL version required: "OpenSSL 1.1.1k 25 Mar 2021"
SSL version found: "OpenSSL 1.1.1k 25 Mar 2021"Kind regards
Yina -
sadly that didn't seem to work, it still is the exact same result as before.
I tried adding in the dll's just in the folder of the executable and I also tried adding the enitre folder + the .lib files in the executable folder so these files:
this is the result when everything is added:
but the result didn't change.
kind regards
Yina -
@Yina said in Is it possible to have "Best of both worlds" within Qt versions regarding modules?:
sadly that didn't seem to work, it still is the exact same result as before.
I tried adding in the dll's just in the folder of the executable and I also tried adding the enitre folder + the .lib files in the executable folder so these files:lib files are not relevant, they are required for build dependencies.
Hmm, very strange, cannot figure out what's going wrong for you...
Sorry, maybe someone else got an idea? -
@Yina It is very odd. I don't know what to advise here further...
Out of curiosity - would you be so kind as to try out to compile in release mode, then copy those libraries again? It will probably change nothing but so far I understand you've tested only in debug.
Also, once you have release version with libraries and all (even if it fails to run as required) could you please try dependency walker on that binary? There is a chance that binaries are indeed okay but something else, not explicitly required (Microsoft runtime libs? something like that? since you run MSVC...) is missing... It's a long shot but who knows?
-
In Qt 6.2, the TLS backend (openSSL support) is a separate plugin.
You need to copy over the plugin too. Your screenshot does not show it.
The file you need should be inC:\Qt\<Qt version>\<compiler>\plugins\tls\opensslbackend.dll
-
Thank you Jonas ! I've spent days on this issue and now its finally fixed :-D