diff options
author | Christian Hesse <mail@eworm.de> | 2020-02-06 18:10:47 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-02-06 18:18:56 +0100 |
commit | 23fe30c4e1134d67650ee0cce2acc350ed154644 (patch) | |
tree | 7b7d43561ebfc9b621d111f5159ab8ed09514906 /check-certificates | |
parent | e376845b12441eb93e39d733aa1c8072b0056a84 (diff) |
check-certificates: rename all certificates by their common names
Diffstat (limited to 'check-certificates')
-rw-r--r-- | check-certificates | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/check-certificates b/check-certificates index f378f01..e13e984 100644 --- a/check-certificates +++ b/check-certificates @@ -8,6 +8,7 @@ :global CertRenewUrl; :global CertRenewPass; +:global CertificateNameByCN; :global ParseKeyValueStore; :global SendNotification; :global UrlEncode; @@ -37,6 +38,10 @@ / certificate import file-name=$CertFileName passphrase=$PassPhrase; } / file remove [ find where name=$CertFileName ]; + + :foreach CertInChain in=[ / certificate find where name~("^" . $CertFileName . "_[0-9]+\$") common-name!=($CertVal->"common-name") ] do={ + $CertificateNameByCN [ / certificate get $CertInChain common-name ]; + } } on-error={ :log debug ("Could not download certificate file " . $CertFileName); } |