mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-21 01:15:42 +02:00
global-functions: $CertificateAvailable: try to use builtin certificates
The builtin certificates were introduced with RouterOS 7.19, so requires this hacky :parse workaround.
This commit is contained in:
parent
d59c4aee26
commit
bf684a7197
1 changed files with 5 additions and 0 deletions
|
@ -119,6 +119,11 @@
|
|||
:return false;
|
||||
}
|
||||
|
||||
:if (([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \
|
||||
[[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CommonName . "\" ] ]") ]] > 0) do={
|
||||
:return true;
|
||||
}
|
||||
|
||||
:if ([ :len [ /certificate/find where common-name=$CommonName ] ] = 0) do={
|
||||
$LogPrint info $0 ("Certificate with CommonName '" . $CommonName . "' not available.");
|
||||
:if ([ $CertificateDownload $CommonName ] = false) do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue