mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-15 04:24:31 +02:00
check-certificates: check and download certificate chain
This commit is contained in:
parent
afd33b8e25
commit
c1c8d46dc0
1 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
:global CertRenewUrl;
|
:global CertRenewUrl;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
||||||
|
:global CertificateAvailable
|
||||||
:global CertificateNameByCN;
|
:global CertificateNameByCN;
|
||||||
:global LogPrintExit;
|
:global LogPrintExit;
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
|
@ -56,6 +57,8 @@
|
||||||
:local CertNew [ / certificate find where common-name=($CertVal->"common-name") fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>3w ];
|
:local CertNew [ / certificate find where common-name=($CertVal->"common-name") fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>3w ];
|
||||||
:local CertNewVal [ / certificate get $CertNew ];
|
:local CertNewVal [ / certificate get $CertNew ];
|
||||||
|
|
||||||
|
$CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN");
|
||||||
|
|
||||||
:if ($Cert != $CertNew) do={
|
:if ($Cert != $CertNew) do={
|
||||||
$LogPrintExit debug ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.") false;
|
$LogPrintExit debug ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.") false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue