Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
6.4.2
-
None
-
Using Qt 6.4.2 installed from the Qt Installer as binaries (not built from source) on Fedora 37 on Intel with gcc 12.2
Description
Am struggling to use ssl with QWebSocket. Get the following error messages:
QML debugging is enabled. Only use this in a safe environment.
qt.tlsbackend.ossl: Incompatible version of OpenSSL (built with OpenSSL 1.x, runtime version is >= 3.x)
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
WSInterface::onError(): Got the web-socket connection error: QAbstractSocket::UnsupportedSocketOperationError
Using Qt 6.4.2 installed from the Qt Installer as binaries (not built from source) on Fedora 37 on Intel with gcc 12.2
QSslSocket::supportsSsl() returns false.
/usr/lib64 is holding:
-rwxr-xr-x. 1 root root 430944 Nov 18 08:51 libssl3.so
lrwxrwxrwx. 1 root root 15 Nov 2 00:41 libssl.so -> libssl.so.3.0.5
lrwxrwxrwx. 1 root root 15 Nov 2 00:41 libssl.so.3 -> libssl.so.3.0.5
-rwxr-xr-x. 1 root root 677480 Nov 2 00:41 libssl.so.3.0.5
I can't see any ssl (or even references to libssl using ldd in the Qt directories)
If I add /usr/lib64 to the front of LD_LIBRARY_PATH the application sig faults on:
this->WebSocket = new QWebSocket();
Since the Qt Maintenance Tool provides the source code for OpenSSL 1.1.1q, I downloaded that and built it using the following commands. Build and install was smooth:
sudo dnf group install 'Development Tools' -y
sudo dnf install perl-core zlib-devel -y
cd ~/Qt/Tools/OpenSSL/src
./config --prefix=/usr/lib64 --openssldir=/usr/lib64 shared zlib
make -j8
make test
sudo make install
make install added the following files to /usr/lib64
lrwxrwxrwx. 1 root root 29 Jul 22 02:33 libevent_openssl-2.1.so.7 -> libevent_openssl-2.1.so.7.0.1
-rwxr-xr-x. 1 root root 36840 Jul 22 02:33 libevent_openssl-2.1.so.7.0.1
lrwxrwxrwx. 1 root root 28 Oct 24 18:02 libxmlsec1-openssl.so -> libxmlsec1-openssl.so.1.2.34
lrwxrwxrwx. 1 root root 28 Oct 24 18:02 libxmlsec1-openssl.so.1 -> libxmlsec1-openssl.so.1.2.34
-rwxr-xr-x. 1 root root 304712 Oct 24 18:02 libxmlsec1-openssl.so.1.2.34
rw-rr-. 1 root root 10909 Jan 10 18:43 openssl.cnf
rw-rr-. 1 root root 10909 Jan 10 18:43 openssl.cnf.dist
ossl-modules:
total 1736
drwxr-xr-x. 2 root root 38 Jan 8 18:32 .
dr-xr-xr-x. 173 root root 118784 Jan 10 18:43 ..
-rwxr-xr-x. 1 root root 1488504 Nov 2 00:41 fips.so
-rwxr-xr-x. 1 root root 120392 Nov 2 00:41 legacy.so
This did not seem to change the result - same error messages when running the application; same sig fault when adding /usr/lib64 in front of LD_LIBRARY_PATH
There seems to be no mention on how to proceed in the help. Qt and Stackoverflow seem to have lots of articles. Besides the LD_LIBRARY_PATH and building from source the other suggestion seems to be install openssl 1.1.1 from the package manager. Tried:
sudo dnf install openssl-1.1.1q-1.fc35.x86_64.rpm
But dbf can't find the .rpm. If I download it from:
https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/Packages/o/openssl-1.1.1l-2.fc35.x86_64.rpm
but then Fedora refused to install it.
Any guidance would be appreciated.
Just for the record:
- It would be great if the Qt could make use of the ssl libraries already present on the system and work "out-the-box"
- If that's not possible, it would be great if SSL binaries could be shipped with Qt and installed by the installer
- If that's not possible, it would be great if the help could provide some guidance on how to proceed to get the build to work. If this is the only possible approach it would be great if there is some guidance on how to package a solution which requires SSL.