diff --git a/check-certificates.rsc b/check-certificates.rsc index 704ea15..6b35cbf 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -38,9 +38,20 @@ :return [ $CharacterReplace [ $CharacterReplace [ :tostr $1 ] "w" "w " ] "d" "d " ]; } + :local FormatSANs do={ + :local SANs $1; + :local Return ""; + + :foreach SAN in=$SANs do={ + :set Return ($Return . "\n " . $SAN); + } + :return $Return; + } + :return ( \ "Name: " . ($CertVal->"name") . "\n" . \ [ $IfThenElse ([ :len ($CertVal->"common-name") ] > 0) ("CommonName: " . ($CertVal->"common-name") . "\n") ] . \ + [ $IfThenElse ([ :len ($CertVal->"subject-alt-name") ] > 0) ("SubjectAltNames:" . [ $FormatSANs ($CertVal->"subject-alt-name") ] . "\n") ] . \ "Private key: " . [ $IfThenElse (($CertVal->"private-key") = true) "available" "missing" ] . "\n" . \ "Fingerprint: " . ($CertVal->"fingerprint") . "\n" . \ "Issuer: " . ($CertVal->"ca") . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") . "\n" . \ diff --git a/doc/check-certificates.d/notification.avif b/doc/check-certificates.d/notification.avif index d7e9e84..7c250da 100644 Binary files a/doc/check-certificates.d/notification.avif and b/doc/check-certificates.d/notification.avif differ