Skip to content

Commit f460e0a

Browse files
authored
Revert old behaviour (#82)
IB-7710 Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent 34f90e3 commit f460e0a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

idupdater.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,15 @@ void idupdater::finished(bool /*changed*/, const QString &err)
150150
emit status(tr("Check completed"));
151151

152152
QJsonObject obj = conf->object();
153+
trusted.clear();
154+
for(const auto &c: conf->object().value(QLatin1String("CERT-BUNDLE")).toArray())
155+
trusted.append(QSslCertificate(QByteArray::fromBase64(c.toString().toLatin1()), QSsl::Der));
153156
if(obj.contains(QLatin1String("UPDATER-MESSAGE-URL")))
154157
{
155-
auto copy = request;
156158
QSslConfiguration ssl = QSslConfiguration::defaultConfiguration();
157159
ssl.setCaCertificates({});
160+
auto copy = request;
158161
copy.setSslConfiguration(ssl);
159-
trusted.clear();
160-
for(const auto &c: conf->object().value(QLatin1String("CERT-BUNDLE")).toArray())
161-
trusted << QSslCertificate(QByteArray::fromBase64(c.toString().toLatin1()), QSsl::Der);
162-
163162
copy.setUrl(obj.value(QLatin1String("UPDATER-MESSAGE-URL")).toString());
164163
QNetworkReply *reply = get(copy);
165164
connect(reply, &QNetworkReply::finished, this, [this, reply]{

0 commit comments

Comments
 (0)