Skip to content

Commit

Permalink
Revert old behaviour (#82)
Browse files Browse the repository at this point in the history
IB-7710

Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma authored Apr 10, 2023
1 parent 34f90e3 commit f460e0a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions idupdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,15 @@ void idupdater::finished(bool /*changed*/, const QString &err)
emit status(tr("Check completed"));

QJsonObject obj = conf->object();
trusted.clear();
for(const auto &c: conf->object().value(QLatin1String("CERT-BUNDLE")).toArray())
trusted.append(QSslCertificate(QByteArray::fromBase64(c.toString().toLatin1()), QSsl::Der));
if(obj.contains(QLatin1String("UPDATER-MESSAGE-URL")))
{
auto copy = request;
QSslConfiguration ssl = QSslConfiguration::defaultConfiguration();
ssl.setCaCertificates({});
auto copy = request;
copy.setSslConfiguration(ssl);
trusted.clear();
for(const auto &c: conf->object().value(QLatin1String("CERT-BUNDLE")).toArray())
trusted << QSslCertificate(QByteArray::fromBase64(c.toString().toLatin1()), QSsl::Der);

copy.setUrl(obj.value(QLatin1String("UPDATER-MESSAGE-URL")).toString());
QNetworkReply *reply = get(copy);
connect(reply, &QNetworkReply::finished, this, [this, reply]{
Expand Down

0 comments on commit f460e0a

Please sign in to comment.