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. qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
Forum Updated to NodeBB v4.3 + New Features

qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 6.2k Views 2 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.
  • H Offline
    H Offline
    hiren21
    wrote on 7 Oct 2017, 02:36 last edited by
    #1

    I am trying to POST request to remote server. Here is my code:

    void LoginWindow::on_login_pushButton_clicked()
    {
        const QString url = ui->server_lineEdit->text ();
        const QString username = ui->username_lineEdit->text ();
        const QString password = ui->password_lineEdit->text ();
        QNetworkAccessManager mAccessManager;
        QNetworkRequest request(QUrl(url + "/api/auth/"));
    
        QUrlQuery urlQuery;
        urlQuery.addQueryItem ("username", username);
        urlQuery.addQueryItem ("password", password);
    
        QUrl params;
        params.setQuery (urlQuery);
    
        QNetworkReply* reply = mAccessManager.post (request, params.toEncoded ());
    
        connect (reply, &QNetworkReply::readyRead, [reply]() {
            qDebug()  << "Ready to read from reply";
        });
        connect (reply, &QNetworkReply::sslErrors, [this] (QList<QSslError> error) {
            qWarning () << "Ssl error: " << error;
        });
    
    }
    

    Everytime I clicked the login button nothing happens, except a message in application output tab.

    qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method
    

    I am using ubuntu 16.04 and Qt 5.9 . Here is a similar problem in the forum. I also installed libssl-0.98 , but still no luck.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 Oct 2017, 19:54 last edited by
      #2

      Hi,

      What exact version of OpenSSL are you using ?

      What error message did you get in your application if any ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hiren21
        wrote on 8 Oct 2017, 02:45 last edited by
        #3

        Here is the output of QSslSocket::sslLibraryBuildVersionString() OpenSSL 1.0.1e-fips 11 Feb 2013

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 8 Oct 2017, 17:45 last edited by
          #4

          One of the reasons of that kind of message is that the version loaded at runtime differs from the one used at building time.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hiren21
            wrote on 9 Oct 2017, 02:36 last edited by
            #5

            So any idea how do I solve the problem ? I can't make any GET or POST request from qt.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 9 Oct 2017, 12:34 last edited by
              #6

              What is the version of OpenSSL you are currently using on your system ?

              How did you install Qt ?

              What exact version is it ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • H Offline
                H Offline
                hiren21
                wrote on 10 Oct 2017, 01:47 last edited by
                #7

                I am noob in Qt so I think my code is not correct . I installed Qt 5.9.0. from official offline installer and openssl version is OpenSSL 1.0.2g 1 Mar 2016

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 10 Oct 2017, 07:12 last edited by
                  #8

                  Then first check with the distribution provided Qt so you'll be sure whether it's your code that has a problem.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    Kien Bui
                    wrote on 3 Oct 2018, 06:59 last edited by
                    #9

                    I'm having this problem
                    Qt version: 5.6
                    Ubuntu 14.04
                    OpenSSL: OpenSSL 1.0.1f 6 Jan 2014
                    Before I used Qt 5.2 and don't get this problem.
                    How to build to app don't show this warning.

                    1 Reply Last reply
                    0

                    • Login

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