From 89c0ad5e912a6173c2f861a944eb5b017c4b2c59 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 7 Apr 2025 13:44:53 +0200 Subject: [PATCH] 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. --- global-functions.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global-functions.rsc b/global-functions.rsc index d6661223..e5eb9e77 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -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 ] }) \