I'm on Ubuntu 16.04, running Qt5.3.0-rc and have OpenSsl 1.0.2g installed in /usr/bin. I've downloaded the latest OpenSsl 1.1.1c sources, build it and installed it in /usr/local/bin
which openssl
returns the /usr/local/bin one
However, when I start a Qt application (from the same terminal window), It still seems to return the list of Ciphers of 1.0.2g
When running strace ./quicksecureclient 2>&1 | grep '^open(".*\.so"' | grep -i ssl
, no ssl lib seems to be loaded.
So I think my first question is: "how does a Qt application determines which openssl libs it uses?"
The following Qt program lists only 4 PSK Ciphers (the same returned by /usr/bin/openssl ciphers -v 'ALL:eNULL' | grep PSK
) while the 1.1.1 openssl returns 60 items
#include <QCoreApplication>
#include <QSslCipher>
#include <QSslConfiguration>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
auto configuration = QSslConfiguration::defaultDtlsConfiguration();
QList<QSslCipher> all_ciphers;
all_ciphers = configuration.supportedCiphers();
for(int i=0;i<all_ciphers.length();i++){
if(all_ciphers[i].name().contains("PSK"))
qDebug() << "Cipher " << all_ciphers[i].name();
}
qDebug() << "Ciphers: " << all_ciphers.length();
return a.exec();
}
Edit1 I think it is hardcoded (defined when configuring/building Qt5): QSslSocket::sslLibraryBuildVersionString()
prints out "OpenSSL 1.0.2k-fips 26 Jan 2017".
Given the incompatibility between 1.0 1nd 1.1 (as @LorinczyZsigmond pointed out), I currently think it is not possible to use OpenSSL 1.1 with Qt5 without rebuilding Qt from code