aboutsummaryrefslogtreecommitdiffstats
path: root/certificate-renew-issued
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-05-12 11:03:06 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-05-12 11:03:06 +0200
commit48f0a2d21118a7bff7d598e84d9f606fb30bf07a (patch)
treefb9746502335552880823e9445cd4201414bb8eb /certificate-renew-issued
parent93ec9afe558ef6eba5d513fab359bb5f6618666d (diff)
parenta71a3d5466548d05d27d31c446c62afdf2412070 (diff)
Merge branch 'scripts' into ros-v7-path-syntax
Diffstat (limited to 'certificate-renew-issued')
-rw-r--r--certificate-renew-issued14
1 files changed, 7 insertions, 7 deletions
diff --git a/certificate-renew-issued b/certificate-renew-issued
index 72b723f..29aaa93 100644
--- a/certificate-renew-issued
+++ b/certificate-renew-issued
@@ -15,16 +15,16 @@
:global LogPrintExit2;
:global MkDir;
-:foreach Cert in=[ / certificate find where issued expires-after<3w ] do={
- :local CertVal [ / certificate get $Cert ];
- / certificate issued-revoke $Cert;
- / certificate set name=($CertVal->"name" . "-revoked-" . [ / system clock get date ]) $Cert;
- / certificate add name=($CertVal->"name") common-name=($CertVal->"common-name") \
+:foreach Cert in=[ /certificate/find where issued expires-after<3w ] do={
+ :local CertVal [ /certificate/get $Cert ];
+ /certificate/issued-revoke $Cert;
+ /certificate/set name=($CertVal->"name" . "-revoked-" . [ /system/clock/get date ]) $Cert;
+ /certificate/add name=($CertVal->"name") common-name=($CertVal->"common-name") \
key-usage=($CertVal->"key-usage") subject-alt-name=($CertVal->"subject-alt-name");
- / certificate sign ($CertVal->"name") ca=($CertVal->"ca");
+ /certificate/sign ($CertVal->"name") ca=($CertVal->"ca");
:if ([ :typeof ($CertIssuedExportPass->($CertVal->"common-name")) ] = "str") do={
:if ([ $MkDir "cert-issued" ] = true) do={
- / certificate export-certificate ($CertVal->"name") type=pkcs12 \
+ /certificate/export-certificate ($CertVal->"name") type=pkcs12 \
file-name=("cert-issued/" . $CertVal->"common-name") \
export-passphrase=($CertIssuedExportPass->($CertVal->"common-name"));
$LogPrintExit2 info $0 ("Issued a new certificate for \"" . $CertVal->"common-name" . \