aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-03 14:12:09 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-03 14:12:09 +0200
commitc1c8d46dc09af17b33e60c370ea620270e78b8f8 (patch)
treeb1c0305245354a538a033ba7b8e9a47db1e66da7 /check-certificates
parentafd33b8e257f9f9b9b666e912504525f04d48d63 (diff)
check-certificates: check and download certificate chain
Diffstat (limited to 'check-certificates')
-rw-r--r--check-certificates3
1 files changed, 3 insertions, 0 deletions
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;