Ssl error messages in console application
I have a simple console app test (win32) that produces ssl errors in the console, even though I do not use ssl
Errors:
qt.network.ssl: QSslSocket: cannot call unresolved function d2i_DHparams
qt.network.ssl: QSslSocket: cannot call unresolved function DH_free
Code:
int main(int argc, char *argv[])
{
QNetworkAccessManager mgr;
if (! QObject::connect(&mgr,
&QNetworkAccessManager
::sslErrors,
[&](QNetworkReply
* reply,
const QList<QSslError>
&) {
reply->ignoreSslErrors();
}))
{
return 0;
}
QString str
= QString("%1apiData.ashx?t=%2&d=%3").
arg("localhost:8080/").
arg(1).
arg(2);
mgr.get(req);
return a.exec();
}
Pro file:
Code:
QT += core network xml
QT -= gui
CONFIG += c++11
CONFIG += console
CONFIG -= app_bundle
DEFINES += QT_DEPRECATED_WARNINGS QT_LARGEFILE_SUPPORT QT_XML_LIB QT_NETWORK_LIB
What could be the problem? My other non-console apps do not produce these errors.
Thanks!