diff options
author | Christian Hesse <mail@eworm.de> | 2021-03-10 23:16:39 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-03-10 23:16:39 +0100 |
commit | 44727842749c418165730b714ac87b2bc48265fa (patch) | |
tree | 3360555275311206c327c64f786da97b6e4f9e3a /global-functions | |
parent | b1647c760c202c79fc0d1f1be38914b6886fb91f (diff) |
global-functions: $CertificateAvailable: use pre-test loop
This is required to test for root CA (without intermediate) directly.
Diffstat (limited to 'global-functions')
-rw-r--r-- | global-functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/global-functions b/global-functions index 2f68148..042d89b 100644 --- a/global-functions +++ b/global-functions @@ -84,7 +84,7 @@ } :local CertVal [ / certificate get [ find where common-name=$CommonName ] ]; - :do { + :while (($CertVal->"akid") != "" && ($CertVal->"akid") != ($CertVal->"skid")) do={ :if ([ :len [ / certificate find where skid=($CertVal->"akid") ] ] = 0) do={ $LogPrintExit2 info $0 ("Certificate chain for \"" . $CommonName . \ "\" is incomplete, missing \"" . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") . "\".") false; @@ -93,7 +93,7 @@ } } :set CertVal [ / certificate get [ find where skid=($CertVal->"akid") ] ]; - } while=(($CertVal->"akid") != "" && ($CertVal->"akid") != ($CertVal->"skid")); + } :return true; } |