est_client: check if a cert is present inside the fwtool helper

This was causing devices without a birt cert being present from doing a
sysupgrade.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2025-08-06 11:03:59 +02:00
parent de7dc7e01a
commit b5b276bfcc

View File

@@ -139,6 +139,9 @@ function load_operational_ca() {
}
function fwtool() {
if (!fs.stat('/etc/ucentral/cert.pem'))
return 0;
let pipe = fs.popen(`openssl x509 -in /etc/ucentral/cert.pem -noout -issuer`);
let issuer = pipe.read("all");
pipe.close();