TLS1.1 is not working in QT.4.7.4
We updated TLS 1.0 to TLS 1.1 . But our application ( QT 4.7.4 ) does not support TLS 1.1 .Currently we are using QNetworkManager to communicate with server and https is not atall hitting the server.so please suggest us how we can resolve this issue ?In Qt 5.x same code working perfectly and getting the data also.here is a sample code
Code:
void Downloader::doDownload()
{
manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(replyFinished(QNetworkReply*)));
manager
->get
(QNetworkRequest
(QUrl("https://www.yahoo.com")));
}
void Downloader::replyFinished (QNetworkReply *reply)
{
if(reply->error())
{
qDebug() << "ERROR!";
qDebug() << reply->errorString();
}
else
{
qDebug() << reply->header(QNetworkRequest::ContentTypeHeader).toString();
qDebug() << reply->header(QNetworkRequest::LastModifiedHeader).toDateTime().toString();
qDebug() << reply->header(QNetworkRequest::ContentLengthHeader).toULongLong();
qDebug() << reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
qDebug() << reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString();
QFile *file = new QFile("/root/NETWORK/tlsnet/ntwrkmangr/downloaded.txt");
if(file
->open
(QFile::Append)) {
file->write(reply->readAll());
file->flush();
file->close();
}
delete file;
}
reply->deleteLater();
}
Re: TLS1.1 is not working in QT.4.7.4
Yes, Qt 5.x supports TLS 1.1 and above.
Apparently, your qt 4.7.4 app doesn't work until you build your app with higher versions of Qt, i mean(upgradation needed). i'm also in same situation if u solved kindly let me know what u have done
Thank you