mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-22 03:12:41 +00:00
global-functions: $CertificateDownload: extend the check for builtin certificates
This commit is contained in:
parent
f69925e537
commit
f5dbc27a01
1 changed files with 6 additions and 1 deletions
|
|
@ -191,7 +191,12 @@
|
|||
$LogPrint warning $0 ("Failed downloading certificate with CommonName '" . $CommonName . \
|
||||
"' from repository! Trying fallback to mkcert.org...");
|
||||
:do {
|
||||
:if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0) do={
|
||||
:local CertSettings [ /certificate/settings/get ];
|
||||
:if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0 && \
|
||||
!((($CertSettings->"builtin-trust-anchors") = "trusted" || \
|
||||
($CertSettings->"builtin-trust-store") ~ "fetch" || \
|
||||
($CertSettings->"builtin-trust-store") = "all") && \
|
||||
[ :len [ /certificate/builtin/find where common-name="ISRG Root X1" ] ] > 0)) do={
|
||||
$LogPrint error $0 ("Required certificate is not available.");
|
||||
:return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue