From a12ccba29e93372e81e41ed1ceeb57cba74e3602 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 4 Dec 2023 12:53:50 +0100 Subject: check-certificates: improve wording --- check-certificates.rsc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'check-certificates.rsc') diff --git a/check-certificates.rsc b/check-certificates.rsc index 87ad1e5..bc6f43a 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -80,7 +80,6 @@ :global FormatLine; :global FormatMultiLines; :global IfThenElse; - :global EitherOr; :local FormatExpire do={ :global CharacterReplace; @@ -96,7 +95,7 @@ :local CertVal [ /certificate/get $Cert ]; :local Return ""; - :for I from=0 to=3 do={ + :for I from=0 to=5 do={ :set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \ ([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]); :set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ]; @@ -116,7 +115,7 @@ [ $IfThenElse ([ :len ($CertVal->"subject-alt-name") ] > 0) ([ $FormatMultiLines "SubjectAltNames" ($CertVal->"subject-alt-name") ] . "\n") ] . \ [ $FormatLine "Private key" [ $IfThenElse (($CertVal->"private-key") = true) "available" "missing" ] ] . "\n" . \ [ $FormatLine "Fingerprint" ($CertVal->"fingerprint") ] . "\n" . \ - [ $FormatLine "Issuer" [ $EitherOr ($CertVal->"ca") [ $FormatCertChain $Cert ] ] ] . "\n" . \ + [ $IfThenElse ([ :len ($CertVal->"ca") ] > 0) [ $FormatLine "Issuer" ($CertVal->"ca") ] [ $FormatLine "Issuer chain" [ $FormatCertChain $Cert ] ] ] . "\n" . \ "Validity:\n" . \ [ $FormatLine " from" ($CertVal->"invalid-before") ] . "\n" . \ [ $FormatLine " to" ($CertVal->"invalid-after") ] . "\n" . \ -- cgit v1.2.3-54-g00ecf