1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

check-certificates: check and download certificate chain

This commit is contained in:
Christian Hesse
2020-04-03 14:12:09 +02:00
parent afd33b8e25
commit c1c8d46dc0

View File

@@ -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;