check-certificates: prevent infinte loop

This commit is contained in:
Christian Hesse 2023-12-04 12:14:52 +01:00
parent 3df99b0ee0
commit a08df7bdec

View file

@ -95,7 +95,7 @@
:local CertVal [ /certificate/get $Cert ];
:local Return "";
:while (true) do={
:for I from=0 to=3 do={
:set Return ($Return . [ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN");
:if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={
:return $Return;
@ -103,6 +103,7 @@
:set Return ($Return . " -> ");
:set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ];
}
:return ($Return . "...");
}
:local CertVal [ /certificate/get $Cert ];