global-functions: $CertificateDownload: extend the check for builtin certificates

This commit is contained in:
Christian Hesse 2026-04-22 09:36:45 +02:00
parent f69925e537
commit f5dbc27a01

View file

@ -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;
}