Commit 1eacbb2d authored by Volker Krause's avatar Volker Krause
Browse files

Skip invalid VDV certificates rather than terminating the download

parent 384e611c
......@@ -114,7 +114,7 @@ static void decodeCert(const QString &certName)
}
cert.writeKey(&f);
} else {
qFatal("%s is invalid", qPrintable(certName));
qWarning("%s is invalid", qPrintable(certName));
}
}
......@@ -148,15 +148,17 @@ int main(int argc, char **argv)
for (auto it = certNames.begin(); it != certNames.end();) {
const auto cert = loadCert(*it);
if (!cert.isValid()) {
qFatal("Invalid certificate: %s", qPrintable(*it));
qWarning("Invalid certificate: %s", qPrintable(*it));
it = certNames.erase(it);
continue;
}
if (!cert.isSelfSigned() && cert.endOfValidity().year() < 2019) {
qDebug() << "discarding" << (*it) << "due to being expired" << cert.endOfValidity();
QFile::rename((*it) + QLatin1String(".vdv-cert"), QLatin1Char('.') + (*it) + QLatin1String(".vdv-cert"));
it = certNames.erase(it);
} else {
++it;
continue;
}
++it;
}
// (5) write qrc file
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment