aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-10-30 21:52:50 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-10-30 22:49:48 +0100
commit3506f710710332186caecfcd64d9a6d8f57f3180 (patch)
tree350c9d1e12654ab54df0757b3f31293581c3faa0 /global-functions.rsc
parenta6584170c31dc9773840adbc1c7b9721544c764e (diff)
global-functions: $CertificateAvailable: fail without CommonName
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc5
1 files changed, 5 insertions, 0 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index e5471dd..47a69c4 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -107,6 +107,11 @@
"is configured to download certificate CRLs to system!");
}
+ :if ([ :len $CommonName ] = 0) do={
+ $LogPrint warning $0 ("No CommonName given!");
+ :return false;
+ }
+
:if ([ :len [ /certificate/find where common-name=$CommonName ] ] = 0) do={
$LogPrint info $0 ("Certificate with CommonName '" . $CommonName . "' not available.");
:if ([ $CertificateDownload $CommonName ] = false) do={