qt6-docker icon indicating copy to clipboard operation
qt6-docker copied to clipboard

Issues when running tests inside a linux container that have ssl requirements

Open CMon opened this issue 1 year ago • 3 comments

After following your instructions from #1 to extend the container by my needed libraries (both via aqt and apt) I now run into the problem that I am unable to run tests that use SSL, I get the following error from Qt:

Incompatible version of OpenSSL (built with OpenSSL >= 3.x, runtime version is < 3.x)

I had a further look into it, and figured out that the packages installed via aqt are build on a recent redhat enterprise version 8.8 (for example: qt.qt6.661.gcc_64 which has a recent openssl (>3.0) your containers are using ubuntu 20.04 which is quite old and only has openssl 1 available. So even deriving a container from your containers and extending it does not work anymore since the whole base needs to be replaced. Or is there a different way to achieve an openssl update?

CMon avatar Dec 20 '23 23:12 CMon

Hi @CMon , unfortunately, you did not provide steps to reproduce - so it will be hard for me to speculate on what's happening there, but I'll try... And you right - the system openssl will not work here, you need to install openssl as a tool provided by aqt like that: aqt install-tool -O "$QT_PATH" linux desktop tools_opensslv3_src - unfortunately it's not a binary, so will require to be built. Also you can try to use rhel lib, but it could become ugly quite quickly...

rabits avatar Dec 21 '23 00:12 rabits

Well basically I create a QHttpServer with a predefined ssl certificate for the tests (created on my system with a recent openssl, and selfsigned (no need to recreate certificates for the tests all the time)). Then use the QNetworkManager to do simple API calls against the HttpServer. I have no simple example at hand.

My current solution is not using #1 advice 2/3 but use advice 1 use your setups as an inspiration on how to use the aqt installer and recreate the images with fedora:40.

CMon avatar Dec 27 '23 23:12 CMon

That's great to see that you've solved the issue by using base fedora docker images! Would probably need to work on this issue, because openssl is quite important library out there... Will check the options.

rabits avatar Dec 28 '23 02:12 rabits