From 4ddc6be5859210e6a4c47699884f3fb67c3ed777 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 15 Sep 2023 22:50:32 +0200 Subject: global-functions: split off $FormatMultiLines ... ... to format multiple lines from an array. --- check-certificates.rsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'check-certificates.rsc') diff --git a/check-certificates.rsc b/check-certificates.rsc index 86e079a..3410d4d 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -78,6 +78,7 @@ :local CertVal $1; :global FormatLine; + :global FormatMultiLines; :global IfThenElse; :global ParseKeyValueStore; @@ -89,7 +90,7 @@ :return ( \ [ $FormatLine "Name" ($CertVal->"name") ] . "\n" . \ [ $IfThenElse ([ :len ($CertVal->"common-name") ] > 0) ([ $FormatLine "CommonName" ($CertVal->"common-name") ] . "\n") ] . \ - [ $IfThenElse ([ :len ($CertVal->"subject-alt-name") ] > 0) ([ $FormatLine "SubjectAltNames" ($CertVal->"subject-alt-name") ] . "\n") ] . \ + [ $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" ($CertVal->"ca" . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN")) ] . "\n" . \ -- cgit v1.2.3-54-g00ecf