Skip to content

Commit

Permalink
lol, fix - ignore all ssl errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Feb 19, 2024
1 parent 24d594c commit 3035121
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/adsb/adsbvehiclemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ void ADSBInternet::requestData(void) {
_adsb_enable = _settings.value("adsb_enable").toBool();
_adsb_show_internet_data = _settings.value("adsb_show_internet_data").toBool();
max_distance = _settings.value("adsb_radius").toInt();
QObject::connect(m_manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(dirty_onSslError(QNetworkReply*, QList<QSslError>)));

QString distance_string = QString::number(max_distance/1852); // convert meters to NM for api

Expand Down Expand Up @@ -421,6 +422,13 @@ void ADSBInternet::processReply(QNetworkReply *reply) {
reply->deleteLater();
}

void ADSBInternet::dirty_onSslError(QNetworkReply *reply, QList<QSslError> errors)
{
// Consti10: Dang openssl - just ignore all SSL errors !
//qDebug()<<"got some ssl errors";
reply->ignoreSslErrors();
}

ADSBSdr::ADSBSdr()
: ADSBapi()
{
Expand Down
2 changes: 1 addition & 1 deletion app/adsb/adsbvehiclemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class ADSBInternet: public ADSBapi {

private slots:
void processReply(QNetworkReply *reply) override;
void dirty_onSslError(QNetworkReply* reply, QList<QSslError> errors);
void requestData() override;

private:
bool _adsb_show_internet_data;
};
Expand Down

0 comments on commit 3035121

Please sign in to comment.