Solved Qt from Source, SSL linking
-
Hi,
I just rebuilt 5.10.0 from source on windows and everything is working fine except my Ssl.
Previously, I was using the Qt installation package and was not building from source.
The Ssl classes used to work fine with this installer.Now I have theses error:
sslCfg uses undefined class 'QSslConfiguration'
'QSslCertificate': undeclared identifierI thought the default configuration when building Qt building was :
QtNetwork dynamically opening OpenSSL libs (-openssl; default)Do I need to rebuilt with -openssl-linked ?
Usually, I just want to place the ssl .dll inside the release folder, but now I can't compile my project since I use some SSL code in my project:logs:
QObject::connect: No such signal QNetworkAccessManager::sslErrors(QNetworkReply*,QList<QSslError>)
QObject::connect: No such signal QNetworkAccessManager::sslErrors(QNetworkReply*,QList<QSslError>)
Problem getting version... "Protocol "https" is unknown" -
I have downloaded "openssl-1.1.0f-vs2015"
I will try to rebuilt Qt with this linked. in the configure optionQt Network:
getifaddrs() ........................... no
IPv6 ifname ............................ no
libproxy ............................... no
OpenSSL ................................ no
Qt directly linked to OpenSSL ........ noconfigure -opensource -confirm-license -release -webengine-pepper-plugins -webengine-proprietary-codecs OPENSSL_LIBS="-llibcryptoMD -llibsslMD" -openssl-linked -I C:\Dropbox\openssl-1.1.0f-vs2015\include -L C:\Dropbox\openssl-1.1.0f-vs2015\lib
ERROR: Feature 'openssl-linked' was enabled, but the pre-condition '!features.securetransport && libs.openssl' failed.
ERROR: Feature 'openssl' was enabled, but the pre-condition '!features.securetransport && (features.openssl-linked || libs.openssl_headers)' failed.
Any help appreciated, I am trying to use openssl-1.1.0f
-
Hi,
You should add the
-v
option to see exactly what fails when the OpenSSL tests are run. -
Hey SGaist, I'm gonna try older open-ssl libs since I think this is related:
http://lists.qt-project.org/pipermail/interest/2017-May/027290.htmlThanks, not much more stuff shown with -v
-
Seems like openssl 1.1 + is not enough
New version:
configure -opensource -confirm-license -release -webengine-pepper-plugins -webengine-proprietary-codecs OPENSSL_LIBS="-llibcrypto -llibssl" -openssl-linked -I C:\Dropbox\openssl-1.1.0f-vs2015\include -L C:\Dropbox\openssl-1.1.0f-vs2015\libChecking for getifaddrs()... no
Checking for IPv6 ifname... no
Checking for OpenSSL... no
Checking for OpenSSL Headers... no
Checking for OpenSSL v. 1.1 support... yesOld version:
configure -opensource -confirm-license -release -webengine-pepper-plugins -webengine-proprietary-codecs OPENSSL_LIBS="-lssleay32 -llibeay32" -openssl-linked -I C:\Dropbox\OpenSSL-win32\include -L C:\Dropbox\OpenSSL-win32\libChecking for getifaddrs()... no
Checking for IPv6 ifname... no
Checking for OpenSSL... yes
Checking for OpenSSL v. 1.1 support... no
Checking for XCB >= 1.5 (core)... noThink if I continue the build I will be okay to use SSL 1.1? (QSslSocket, etc.) will work?
Any way to speed compilation of the whole Qt ? using -mp flag with VS2015? I find making mistake takes a long time haha :)
Love how easy it is to build Qt, happy that I learn it -
Do you have several version of OpenSSL installed ?
It seems to find it but not a 1.1 version which is a bit surprising.
-
Finally I decided to build qt with 1.0 ssl (first command line up here) and it worked well.
I don't have SSL installed, I just use a downloaded version and link it when building qt (not on my system path).
Now building qt for osx. I am doing two build
one with -no-openssl -securetransport
and the other without theses 2 flags.
Not sure if SSL classes are gonna work (QSslCertificate, QSslSocket), will try both kit in QtCreator and see.Thanks for your help!