Commit 58c25c8c authored by Christian Hesse's avatar Christian Hesse

check-certificates: add url encoding for certificate download

parent e562825b
......@@ -9,6 +9,7 @@
:global CertRenewPass;
:global SendNotification;
:global UrlEncode;
:local GetIssuerCN do={
:foreach IssuerI in=$1 do={
......@@ -35,14 +36,15 @@
}
:foreach Type in={ ".pem"; ".p12" } do={
:local CertFileName ([ $UrlEncode $CommonName ] . $Type);
:do {
/ tool fetch check-certificate=yes-without-crl ($CertRenewUrl . $CommonName . $Type);
/ tool fetch check-certificate=yes-without-crl ($CertRenewUrl . $CertFileName);
:foreach PassPhrase in=$CertRenewPass do={
/ certificate import file-name=($CommonName . $Type) passphrase=$PassPhrase;
/ certificate import file-name=$CertFileName passphrase=$PassPhrase;
}
/ file remove [ find where name=($CommonName . $Type) ];
/ file remove [ find where name=$CertFileName ];
} on-error={
:log debug ("Could not download certificate file " . $CommonName . $Type);
:log debug ("Could not download certificate file " . $CertFileName);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment