diff options
author | Christian Hesse <mail@eworm.de> | 2023-04-06 10:18:41 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-04-06 20:33:01 +0200 |
commit | 706e4de6d1ed218ca689885621183ba42a9d62cf (patch) | |
tree | 00ed2b0f232824866777b29e19061ee04200ca17 | |
parent | a263fcdec2da2360cebea137085a60c7a67c4198 (diff) |
check-certificates: show CommonName only if available
-rw-r--r-- | check-certificates.rsc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/check-certificates.rsc b/check-certificates.rsc index ed50eea..704ea15 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -40,7 +40,7 @@ :return ( \ "Name: " . ($CertVal->"name") . "\n" . \ - "CommonName: " . ($CertVal->"common-name") . "\n" . \ + [ $IfThenElse ([ :len ($CertVal->"common-name") ] > 0) ("CommonName: " . ($CertVal->"common-name") . "\n") ] . \ "Private key: " . [ $IfThenElse (($CertVal->"private-key") = true) "available" "missing" ] . "\n" . \ "Fingerprint: " . ($CertVal->"fingerprint") . "\n" . \ "Issuer: " . ($CertVal->"ca") . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") . "\n" . \ |