My application = libssl.so (1.0.2f) + libcrypto.so (1.0.2f) + my_app_exe
On Debian 9, QT version is 5.7 and openssl is 1.0.2l
my_app_exe returns 1.0.2l for QSslSocket::sslLibraryVersionString(), which means its using system openssl version.
Can I force QT libraries to somehow use openssl shipped along with my application?
I've tried setting library path using QCoreApplication::addLibraryPath(const QString &path), but QT library still picks up system openssl version.
Constraints:
- Can't recompile QT library thats present on the system
- Can't ship QT library along with the application
- Can't change RPATH on system QT libraries
my_app_exe already uses RPATH which points to the current directory where shipped openssl resides.
On Debian 9 I was able to get the correct SSL and Crypto libraries to load if I preload (load them as the first thing in the main()) using
QLibrarycalls. This is exactly what QT libraries are doing loadOpenSsl()Remember, I also have RPATH set on the application
crypto libraries are stored in
./my_app_exe/lib/lib{ssl,crypto}.soBTW, setting
LD_LIBRARY_PATHdidn't work for me.