What's the difference between run-time and linked OpenSSL support when building Qt?
Printable View
What's the difference between run-time and linked OpenSSL support when building Qt?
Resolving OpenSSL libs dynamically at run-time when needed vs. linking to OpenSSL libs when building Qt. The former is much more dynamic - the latter requires that the necessary libs are present also when deployed or the app won't run.
No, we are talking about linking versus loading a shared library at runtime (ie. QLibrary).
I'm not referring to dynamic or static linking in particular, I'm just talking about linking in general.
It is possible to access a shared library without linking, via dlopen() on *nix and something else on Windows I suppose (QLibrary hides this). The idea is to load the shared library at runtime and resolve exported symbols on the fly. This way the program can be run with or without the shared library. Resolving will just fail if the library doesn't exist, and the particular feature can be left out. But if you link to a library, the library needs to exist in order to launch the application.
In other words linked approach requires you to ship OpenSSL libraries even if your application doesn't use SSL. Run-time dependency means OpenSSL is treated as a plugin and loaded when needed.
I always thinking what -opensll-linked must incapsulate all OpenSLL code into QtNetwork4.dll and not have dependencies for libeay32.dll or something else. So if its wrong, we want third key for configure - -openssl-static for example.
Hi All,
I am new in Qt programming, i need your help to resolve an issue.
I want to display certificate information of secured website in "Qt demo brower", for this i write code to display but i am unable to get "defaultCaCertificate", "caCertificate" and "peerCertificateChain".
Do we need any type of initilization before using these APIs ?
Every time when i call below code it retrive 0 items in dCaCertificates.
QList<QSslCertificate> dCaCertificates = QSslSocket::defaultCaCertificates();
But i am able to get system certificates using below code:
QList<QSslCertificate> sysCertificates = QSslSocket::systemCaCertificates();
Please help me, its urgent.
Regards,
Pranay
Hi Pranay,
If you want to get and display certificate details in Qt demo browser, here is the code:
First of all to peerCertificateChain details, one can use the SLOT sslError, the argument within this SLOT named QNetworkReply have all the details of peerCertificateChain and peerCertificate.
void NetworkAccessManager::sslError(QNetworkReply *reply, const QList<QSslError> &error)
{
QList<QSslCertificate> peerCertificateChain = reply->sslConfiguration().peerCertificateChain();
}
Thanks & Regards,
Software