From 7cdeb9185e10ed35b5590087e035d29626eacb08 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 3 Apr 2020 16:43:55 +0200 Subject: global-functions: $CertificateAvailable: use $LogPrintExit --- global-functions | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 29ce59d..9375688 100644 --- a/global-functions +++ b/global-functions @@ -47,16 +47,18 @@ :local CommonName [ :tostr $1 ]; :global CertificateDownload; + :global LogPrintExit; :global ParseKeyValueStore; :if ([ / system resource get free-hdd-space ] < 8388608 && \ [ / certificate settings get crl-download ] = true && \ [ / certificate settings get crl-store ] = "system") do={ - :log warning "This system has low free flash space but is configured to download certificate CRLs to system!"; + $LogPrintExit warning ("This system has low free flash space but " . \ + "is configured to download certificate CRLs to system!") false; } :if ([ / certificate print count-only where common-name=$CommonName ] = 0) do={ - :log info ("Certificate with CommonName \"" . $CommonName . "\" not available."); + $LogPrintExit info ("Certificate with CommonName \"" . $CommonName . "\" not available.") false; :if ([ $CertificateDownload $CommonName ] = false) do={ :return false; } @@ -66,7 +68,8 @@ :local Issuer $CommonName; :do { :if ([ / certificate print count-only where common-name=$Issuer ] = 0) do={ - :log info ("Certificate chain for \"" . $CommonName . "\" is incomplete, missing \"" . $Issuer . "\"."); + $LogPrintExit info ("Certificate chain for \"" . $CommonName . \ + "\" is incomplete, missing \"" . $Issuer . "\".") false; :if ([ $CertificateDownload $CommonName ] = false) do={ :return false; } -- cgit v1.2.3-54-g00ecf