check-certificates: better error handling and reporting for downloads

This commit is contained in:
Christian Hesse 2026-01-22 14:26:21 +01:00
parent 2dc434b332
commit b74e40dde1

View file

@ -55,9 +55,17 @@
"' (file '" . $CertFileName . "')..."); "' (file '" . $CertFileName . "')...");
:do { :do {
/tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \ :onerror Err {
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value; /tool/fetch check-certificate=yes-without-crl \
$WaitForFile $CertFileName; http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
} do={
:if ($Err != "Fetch failed with status 404") do={
$LogPrint warning $0 ("Failed fetching certificate: " . $Err);
}
:error false;
}
$WaitForFile $CertFileName;
:local DecryptionFailed true; :local DecryptionFailed true;
:foreach I,PassPhrase in=$CertRenewPass do={ :foreach I,PassPhrase in=$CertRenewPass do={