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
Qt Code:
  1. void Downloader::doDownload()
  2.  
  3. {
  4. manager = new QNetworkAccessManager(this);
  5. connect(manager, SIGNAL(finished(QNetworkReply*)),
  6. this, SLOT(replyFinished(QNetworkReply*)));
  7. manager->get(QNetworkRequest(QUrl("https://www.yahoo.com")));
  8.  
  9. }
  10. void Downloader::replyFinished (QNetworkReply *reply)
  11. {
  12. if(reply->error())
  13. {
  14. qDebug() << "ERROR!";
  15. qDebug() << reply->errorString();
  16. }
  17. else
  18. {
  19. qDebug() << reply->header(QNetworkRequest::ContentTypeHeader).toString();
  20. qDebug() << reply->header(QNetworkRequest::LastModifiedHeader).toDateTime().toString();
  21. qDebug() << reply->header(QNetworkRequest::ContentLengthHeader).toULongLong();
  22. qDebug() << reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
  23. qDebug() << reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString();
  24.  
  25. QFile *file = new QFile("/root/NETWORK/tlsnet/ntwrkmangr/downloaded.txt");
  26. if(file->open(QFile::Append))
  27. {
  28. file->write(reply->readAll());
  29. file->flush();
  30. file->close();
  31. }
  32. delete file;
  33. }
  34.  
  35. reply->deleteLater();
  36. }
To copy to clipboard, switch view to plain text mode