aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-03 14:36:32 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-03 14:36:32 +0200
commit151630b6741d19c439713d1e3f31529052a41697 (patch)
tree8146213f7a0df3735aa0bc2f1b227c6abb08a5b5
parenta304a2fa69f68aa1c05058edc6d9569b054b5ddc (diff)
check-certificates: warn about missing chain
-rw-r--r--check-certificates4
1 files changed, 3 insertions, 1 deletions
diff --git a/check-certificates b/check-certificates
index ad19059..40e509b 100644
--- a/check-certificates
+++ b/check-certificates
@@ -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;