check-certificates: warn about missing chain

This commit is contained in:
Christian Hesse 2020-04-03 14:36:32 +02:00
parent a304a2fa69
commit 151630b674

View file

@ -57,7 +57,9 @@
:local CertNew [ / certificate find where common-name=($CertVal->"common-name") fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>3w ];
:local CertNewVal [ / certificate get $CertNew ];
$CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN");
:if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") ] = false) do={
$LogPrintExit warning ("The certificate chain is not available!") false;
}
:if ($Cert != $CertNew) do={
$LogPrintExit debug ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.") false;