There was some problem of the next kind. There is an application that performs post and get requests, everything functions adequately, but only with http, if the call goes through https, then Qt throws out the error qt.network.ssl: QSslSocket :: connectToHostEncrypted: TLS initialization failed. After googling problems, I learned that the SSL libraries might be missing, hence the question, where can I get this business and how to connect it to the project? I will be grateful to any tips, just in case I attach my code

mainwindow.cpp

#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_pushButton_clicked() { QString A, B, C, X, Z; QByteArray data= "{ \"Authorization\":\"Bearer AQAAAAAGX9TiAATuwa8z\" }"; A=ui->lineEdit->text(); //широта B=ui->lineEdit_2->text(); //долгота C=ui->lineEdit_3->text(); // масштаб X= "https://static-maps.yandex.ru/1.x/?ll="+B+","+A+"&z="+C+"&size=600,450&l=map"; //сначала долгота ui->preview->load(QUrl(X)); ui->preview->show(); manager = new QNetworkAccessManager(); connect(manager, &QNetworkAccessManager::finished, this, &MainWindow::onResult); QNetworkRequest request(QUrl("https://mdb.api.cloud.yandex.net/managed-postgresql/v1/clusters/c9qmjpt4v23oohbuj1vu/databases/db1")); // manager->get(QNetworkRequest(QUrl("http://www.evileg.ru/it_example.json"))); manager->get(request); // manager->post(request, data); } void MainWindow::onResult(QNetworkReply *reply) { if(reply->error() == QNetworkReply::NoError){ QByteArray json_data = reply->readAll(); ui->textEdit->setPlainText(json_data) } else { qDebug() << "error: " << reply->error(); } reply->deleteLater(); } 

mainwindow.h

 #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QtNetwork/QNetworkAccessManager> #include <QtNetwork/QNetworkRequest> #include <QtNetwork/QNetworkReply> #include <QJsonDocument> #include <QJsonObject> #include <QJsonArray> #include <QUrlQuery> #include <QUrl> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = nullptr); ~MainWindow(); private slots: void on_pushButton_clicked(); void onResult(QNetworkReply *reply); private: Ui::MainWindow *ui; QNetworkAccessManager* manager; }; #endif // MAINWINDOW_H 

2 answers 2

So, for Windows users and the MSVC compiler, in case of a similar problem, I can recommend to do the following things:
1. From here Win32 / Win64 OpenSSL Installer for Windows Win32 OpenSSL 1.0.2 of the corresponding version is downloaded (x64 for msvc2017_64 and x32 for msvc2017_32, the studio version may be different) , you can download light.
2. Install Win32 OpenSSL.
3. From the root folder of the previously installed OpenSLL, we remove the files libeay32.dll, libssl32.dll, ssleay32.dll and send them along the path \ Qt \ 5.12.1 \ msvc2017 \ bin (versions of Qt and MSVC may differ) , send in accordance with the bit depth .
4. We check the performance

This option helped me.

    Faced the same problem QSslSocket::connectToHostEncrypted: TLS initialization failed when transferring everything to the virtual server. It is not very convenient to copy either every time to the folder with Qt, forgetting is easy, especially that the version changes frequently. Therefore, in that installer it is necessary to mark the item copy everything to Windows.