mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-22 17:53:31 +02:00
check-certificates: prevent infinte loop
This commit is contained in:
parent
3df99b0ee0
commit
a08df7bdec
1 changed files with 2 additions and 1 deletions
|
@ -95,7 +95,7 @@
|
||||||
:local CertVal [ /certificate/get $Cert ];
|
:local CertVal [ /certificate/get $Cert ];
|
||||||
:local Return "";
|
:local Return "";
|
||||||
|
|
||||||
:while (true) do={
|
:for I from=0 to=3 do={
|
||||||
:set Return ($Return . [ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN");
|
:set Return ($Return . [ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN");
|
||||||
:if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={
|
:if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={
|
||||||
:return $Return;
|
:return $Return;
|
||||||
|
@ -103,6 +103,7 @@
|
||||||
:set Return ($Return . " -> ");
|
:set Return ($Return . " -> ");
|
||||||
:set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ];
|
:set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ];
|
||||||
}
|
}
|
||||||
|
:return ($Return . "...");
|
||||||
}
|
}
|
||||||
|
|
||||||
:local CertVal [ /certificate/get $Cert ];
|
:local CertVal [ /certificate/get $Cert ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue