diff options
author | Christian Hesse <mail@eworm.de> | 2024-10-30 21:52:50 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-10-30 22:49:48 +0100 |
commit | 3506f710710332186caecfcd64d9a6d8f57f3180 (patch) | |
tree | 350c9d1e12654ab54df0757b3f31293581c3faa0 /global-functions.rsc | |
parent | a6584170c31dc9773840adbc1c7b9721544c764e (diff) |
global-functions: $CertificateAvailable: fail without CommonName
Diffstat (limited to 'global-functions.rsc')
-rw-r--r-- | global-functions.rsc | 5 |
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={ |