Wrong version of OpenSSL used when deploying application
-
wrote on 11 Aug 2023, 09:29 last edited by rctm 8 Nov 2023, 09:53
My Application is running fine when launched from QtCreator, but can't run from console.
Error when ran from console:qt.tlsbackend.ossl: Incompatible version of OpenSSL (built with OpenSSL >= 3.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 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 QSslSocket qt.network.ssl: The backend named "cert-only" does not support TLS qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
.pro file:
LIBS += -L/usr/local/lib64 -lcrypto -lssl
ldd application output:
libcrypto.so.3 => /usr/local/lib64/libcrypto.so.3 (0x00007face2a90000) libssl.so.3 => /usr/local/lib64/libssl.so.3 (0x00007face29d9000)
How can I tell Qt which library to use when deploying my application?
OS is debian 9 and OpenSSL 3.2.0-dev is installed.
QT version is 6.5.2. -
@Christian-Ehrlicher said in Wrong version of OpenSSL used when deploying application:
LD_LIBRARY_PATH
Thank you! I can now run the application from terminal if I add the path of the openssl libs to LD_LIBRARY_PATH.
Whats weird is that I've already added this path to /etc/ld.so.conf and ran ldconfig, so the path should already be known.@rctm When openssl is loaded at runtime, Qt does not use
ld
. Instead, it checks out directories inLD_LIBRARY_PATH
, and some default locations (/lib
,/usr/lib
,/usr/local/lib
, as well thelib32
andlib64
variants:So augmenting
/etc/ld.so.conf
won't make a difference. -
My Application is running fine when launched from QtCreator, but can't run from console.
Error when ran from console:qt.tlsbackend.ossl: Incompatible version of OpenSSL (built with OpenSSL >= 3.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 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 QSslSocket qt.network.ssl: The backend named "cert-only" does not support TLS qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
.pro file:
LIBS += -L/usr/local/lib64 -lcrypto -lssl
ldd application output:
libcrypto.so.3 => /usr/local/lib64/libcrypto.so.3 (0x00007face2a90000) libssl.so.3 => /usr/local/lib64/libssl.so.3 (0x00007face29d9000)
How can I tell Qt which library to use when deploying my application?
OS is debian 9 and OpenSSL 3.2.0-dev is installed.
QT version is 6.5.2. -
wrote on 14 Aug 2023, 09:04 last edited by
@JoeCFD In my understanding I've already done that here:
ldd output of built application:libcrypto.so.3 => /usr/local/lib64/libcrypto.so.3 (0x00007face2a90000) libssl.so.3 => /usr/local/lib64/libssl.so.3 (0x00007face29d9000)
qt.tlsbackend.ossl: Incompatible version of OpenSSL (built with OpenSSL >= 3.x, runtime version is < 3.x)
Like it's saying here my runtime version is too low, but OpenSSL 3.2.0 is installed.
Since it works fine in QTCreator I'm thinking it has to be some kind of configuration problem. Is there a setting I'm missing? -
@JoeCFD In my understanding I've already done that here:
ldd output of built application:libcrypto.so.3 => /usr/local/lib64/libcrypto.so.3 (0x00007face2a90000) libssl.so.3 => /usr/local/lib64/libssl.so.3 (0x00007face29d9000)
qt.tlsbackend.ossl: Incompatible version of OpenSSL (built with OpenSSL >= 3.x, runtime version is < 3.x)
Like it's saying here my runtime version is too low, but OpenSSL 3.2.0 is installed.
Since it works fine in QTCreator I'm thinking it has to be some kind of configuration problem. Is there a setting I'm missing?Lifetime Qt Championwrote on 14 Aug 2023, 09:11 last edited by Christian EhrlicherSince the openssl libs are loaded dynamically on runtime the linker will not help here. I would guess QtCreator is setting the LD_LIBRARY_PATH accordingly so the correct openssl libs are loaded during runtime.
-
Since the openssl libs are loaded dynamically on runtime the linker will not help here. I would guess QtCreator is setting the LD_LIBRARY_PATH accordingly so the correct openssl libs are loaded during runtime.
wrote on 14 Aug 2023, 11:24 last edited by@Christian-Ehrlicher said in Wrong version of OpenSSL used when deploying application:
LD_LIBRARY_PATH
Thank you! I can now run the application from terminal if I add the path of the openssl libs to LD_LIBRARY_PATH.
Whats weird is that I've already added this path to /etc/ld.so.conf and ran ldconfig, so the path should already be known. -
wrote on 14 Aug 2023, 11:32 last edited by
@rctm
Only a guess here. If you are saying you have a different version of the library onLD_LIBRARY_PATH
then maybeld.so.conf
only adds an extra place to look by default afterLD_LIBRARY_PATH
, you have to insert your desired location earlier inLD_LIBRARY_PATH
to prevent the other one being found first? -
@Christian-Ehrlicher said in Wrong version of OpenSSL used when deploying application:
LD_LIBRARY_PATH
Thank you! I can now run the application from terminal if I add the path of the openssl libs to LD_LIBRARY_PATH.
Whats weird is that I've already added this path to /etc/ld.so.conf and ran ldconfig, so the path should already be known.@rctm When openssl is loaded at runtime, Qt does not use
ld
. Instead, it checks out directories inLD_LIBRARY_PATH
, and some default locations (/lib
,/usr/lib
,/usr/local/lib
, as well thelib32
andlib64
variants:So augmenting
/etc/ld.so.conf
won't make a difference. -
-
M mzimmers referenced this topic on 7 Dec 2023, 19:26
1/7