aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-03 16:43:55 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-03 16:59:10 +0200
commit7cdeb9185e10ed35b5590087e035d29626eacb08 (patch)
tree9b6d4c7c8f4d3bc9806f7ed0e4531ab51c18c7fa /global-functions
parent324f5b0ba428abf477f128577f2f6c3604a15ab5 (diff)
global-functions: $CertificateAvailable: use $LogPrintExit
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions9
1 files changed, 6 insertions, 3 deletions
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;
}