From c1c8d46dc09af17b33e60c370ea620270e78b8f8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 3 Apr 2020 14:12:09 +0200 Subject: check-certificates: check and download certificate chain --- check-certificates | 3 +++ 1 file changed, 3 insertions(+) (limited to 'check-certificates') diff --git a/check-certificates b/check-certificates index b9c9075..ad19059 100644 --- a/check-certificates +++ b/check-certificates @@ -9,6 +9,7 @@ :global CertRenewUrl; :global Identity; +:global CertificateAvailable :global CertificateNameByCN; :global LogPrintExit; :global ParseKeyValueStore; @@ -56,6 +57,8 @@ :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 ($Cert != $CertNew) do={ $LogPrintExit debug ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.") false; -- cgit v1.2.3-54-g00ecf