mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $CertificateAvailable: use pre-test loop
This is required to test for root CA (without intermediate) directly.
This commit is contained in:
parent
b1647c760c
commit
4472784274
1 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@
|
|||
}
|
||||
|
||||
:local CertVal [ / certificate get [ find where common-name=$CommonName ] ];
|
||||
:do {
|
||||
:while (($CertVal->"akid") != "" && ($CertVal->"akid") != ($CertVal->"skid")) do={
|
||||
:if ([ :len [ / certificate find where skid=($CertVal->"akid") ] ] = 0) do={
|
||||
$LogPrintExit2 info $0 ("Certificate chain for \"" . $CommonName . \
|
||||
"\" is incomplete, missing \"" . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") . "\".") false;
|
||||
|
@ -93,7 +93,7 @@
|
|||
}
|
||||
}
|
||||
:set CertVal [ / certificate get [ find where skid=($CertVal->"akid") ] ];
|
||||
} while=(($CertVal->"akid") != "" && ($CertVal->"akid") != ($CertVal->"skid"));
|
||||
}
|
||||
:return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue