From 3506f710710332186caecfcd64d9a6d8f57f3180 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 30 Oct 2024 21:52:50 +0100 Subject: global-functions: $CertificateAvailable: fail without CommonName --- global-functions.rsc | 5 +++++ 1 file changed, 5 insertions(+) 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={ -- cgit v1.2.3-70-g09d2