aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-03 14:53:29 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-03 15:03:27 +0200
commite963e091148dd095cd9d1510eae0249849309e4e (patch)
tree807a3ddb0b8b8589dfda598ecab25d98ad720d73 /global-functions
parentabb97601cee8772122a1baba470918e66a06fe00 (diff)
global-functions: $GetMacVendor: check status of certificate download
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions8
1 files changed, 5 insertions, 3 deletions
diff --git a/global-functions b/global-functions
index 3fd45c7..05d98ed 100644
--- a/global-functions
+++ b/global-functions
@@ -256,11 +256,13 @@
:local Mac [ :tostr $1 ];
:global CertificateAvailable;
+ :global LogPrintExit;
:do {
- :local Vendor;
- $CertificateAvailable "Let's Encrypt Authority X3";
- :set Vendor ([ / tool fetch check-certificate=yes-without-crl \
+ :if ([ $CertificateAvailable "Let's Encrypt Authority X3" ] = false) do={
+ $LogPrintExit warning ("Downloading required certificate failed.") true;
+ }
+ :local Vendor ([ / tool fetch check-certificate=yes-without-crl \
("https://api.macvendors.com/" . [ :pick $Mac 0 8 ]) output=user as-value ]->"data");
:return $Vendor;
} on-error={