Unsolved qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
-
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.
-
Hi,
What exact version of OpenSSL are you using ?
What error message did you get in your application if any ?
-
Here is the output of QSslSocket::sslLibraryBuildVersionString()
OpenSSL 1.0.1e-fips 11 Feb 2013
-
One of the reasons of that kind of message is that the version loaded at runtime differs from the one used at building time.
-
So any idea how do I solve the problem ? I can't make any GET or POST request from qt.
-
What is the version of OpenSSL you are currently using on your system ?
How did you install Qt ?
What exact version is it ?
-
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
-
Then first check with the distribution provided Qt so you'll be sure whether it's your code that has a problem.
-
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.