mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 01:49:28 +00:00
INITIAL-COMMANDS: support new builtin-trust-store...
... which was introduced with RouterOS 7.21beta7.
This commit is contained in:
parent
1a1399d302
commit
fbfeea3042
1 changed files with 5 additions and 2 deletions
|
|
@ -22,8 +22,11 @@ Run the complete base installation:
|
|||
:local CertFileName "ISRG-Root-X2.pem";
|
||||
:local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
|
||||
|
||||
:if (!(([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \
|
||||
[[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={
|
||||
:local CertSettings [ /certificate/settings/get ];
|
||||
:if (!((($CertSettings->"builtin-trust-anchors") = "trusted" || \
|
||||
($CertSettings->"builtin-trust-store") ~ "fetch" || \
|
||||
($CertSettings->"builtin-trust-store") = "all") && \
|
||||
[[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={
|
||||
:put "Importing certificate...";
|
||||
/tool/fetch ($BaseUrl . "certs/" . $CertFileName) dst-path=$CertFileName as-value;
|
||||
:delay 1s;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue