aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-04-06 10:18:41 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-04-06 20:33:01 +0200
commit706e4de6d1ed218ca689885621183ba42a9d62cf (patch)
tree00ed2b0f232824866777b29e19061ee04200ca17 /check-certificates.rsc
parenta263fcdec2da2360cebea137085a60c7a67c4198 (diff)
check-certificates: show CommonName only if available
Diffstat (limited to 'check-certificates.rsc')
-rw-r--r--check-certificates.rsc2
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" . \