global-functions: $CertificateDownload: no infinite loop

We can not call $CertificateAvailable here, as that will most likely
cause an infinite loop. After all that's the certificate mkcert.org is
using. And it *is* available in this repository.
This commit is contained in:
Christian Hesse 2025-04-07 13:44:53 +02:00
parent 314ba5796d
commit 019e10e190

View file

@ -167,8 +167,8 @@
$LogPrint warning $0 ("Failed downloading certificate with CommonName '" . $CommonName . \
"' from repository! Trying fallback to mkcert.org...");
:do {
:if ([ $CertificateAvailable "ISRG Root X1" ] = false) do={
$LogPrint error $0 ("Downloading required certificate failed.");
:if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0) do={
$LogPrint error $0 ("Required certificate is not available.");
:return false;
}
/tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $0 ] }) \