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 ?
-
One of the reasons of that kind of message is that the version loaded at runtime differs from the one used at building time.
-
What is the version of OpenSSL you are currently using on your system ?
How did you install Qt ?
What exact version is it ?
-
Then first check with the distribution provided Qt so you'll be sure whether it's your code that has a problem.