aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-12-04 12:53:50 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-12-05 00:11:19 +0100
commita12ccba29e93372e81e41ed1ceeb57cba74e3602 (patch)
tree7616607a859a1aa5db9bd17883d964496fd80829 /check-certificates.rsc
parent8de6995c4b38f80439f0b70dc19f747f4f58f83d (diff)
check-certificates: improve wording
Diffstat (limited to 'check-certificates.rsc')
-rw-r--r--check-certificates.rsc5
1 files changed, 2 insertions, 3 deletions
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" . \