Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get http respond from HTTPS?
Forum Updated to NodeBB v4.3 + New Features

How to get http respond from HTTPS?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 116 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mucip
    wrote on 7 Feb 2020, 18:38 last edited by Mucip
    #1

    Hi,
    I use Qt5.13.2 on Win 10. I have a php page which is return some information from web server. The website working HTTP before. But now I want to increas security and started to use HTTPS. And now I can not get information from website?

    I use below method to get info from website:

    QNetworkAccessManager *manager = new QNetworkAccessManager(this);
        connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(fileIsReady(QNetworkReply*)) );
        manager->get(QNetworkRequest(QUrl("https://xxx.com/dene/yyy.php")));
    

    I get error below:
    qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed

    What should I do now?

    Regards,
    Mucip:)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mucip
      wrote on 7 Feb 2020, 19:22 last edited by Mucip 2 Jul 2020, 20:25
      #2

      Hi,
      Well, I found this post and it's OK now.
      I used Qt Maintenance to install OpenSSL with the same version of installed Qt and add the openSSL's bin directory to windows path variable.

      restart Qt and all is fine now.
      Please check with yours with below code:

      qDebug()<<"----"<<QSslSocket::sslLibraryBuildVersionString();
      qDebug()<<"----"<<QSslSocket::sslLibraryVersionString();
      

      My resutl now:
      ---- "OpenSSL 1.1.1b 26 Feb 2019"
      ---- "OpenSSL 1.1.1d 10 Sep 2019"

      Regards,
      Mucip:)

      1 Reply Last reply
      1

      1/2

      7 Feb 2020, 18:38

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved