:global GlobalFuncReady false;
# Git commit id & info, expected configuration version
-:global CommitId "main/346/bb13b669";
+:global CommitId "main/347/81bfb1ca";
:global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 04:05:02 01.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 04:45:02 01.05.2026.";
# The variables are received right here.
:global GlobalConfVersion 138;
# Git commit id & info, expected configuration version
:global CommitId "unknown";
:global CommitInfo "unknown";
-:global ExpectedConfigVersion 139;
+:global ExpectedConfigVersion 143;
# global variables not to be changed by user
:global GlobalFunctionsReady false;
:local UseFor [ :tostr $2 ];
:global CertificateDownload;
- :global EitherOr;
:global LogPrint;
:global ParseKeyValueStore;
- :set UseFor [ $EitherOr $UseFor "undefined" ];
+ :if ([ :len $UseFor ] = 0) do={
+ $LogPrint warning $0 ("The intended use is undefined!");
+ :set UseFor "undefined";
+ }
:if ([ /system/resource/get free-hdd-space ] < 8388608 && \
[ /certificate/settings/get crl-download ] = true && \
$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;
}