aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-05-02 11:12:44 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-05-02 11:16:28 +0200
commit360d30bf2adf91542b041489a5b71ac33daa1ac9 (patch)
treedd95ca885dcc3cc33834cbc9c238be59d835899a /check-certificates
parent42834e9de1a7cdf2b57d41ce9b1e2d11d0089ffc (diff)
check-certificates: give issuer info on locally issued certificates
Certificates issued locally do not have an 'issuer' property, but a 'ca' one. Looks like either of both is filled, so just concatenate.
Diffstat (limited to 'check-certificates')
-rw-r--r--check-certificates3
1 files changed, 2 insertions, 1 deletions
diff --git a/check-certificates b/check-certificates
index 9dd9acb..0d0ea55 100644
--- a/check-certificates
+++ b/check-certificates
@@ -98,6 +98,7 @@
:local CertName [ / certificate get $Cert name ];
:local CommonName [ / certificate get $Cert common-name ];
:local FingerPrint [ / certificate get $Cert fingerprint ];
+ :local Ca [ / certificate get $Cert ca ];
:local Issuer [ $GetIssuerCN [ / certificate get $Cert issuer ] ];
:local InvalidBefore [ / certificate get $Cert invalid-before ];
:local InvalidAfter [ / certificate get $Cert invalid-after ];
@@ -114,7 +115,7 @@
"Name: " . $CertName . "\n" . \
"CommonName: " . $CommonName . "\n" . \
"Fingerprint: " . $FingerPrint . "\n" . \
- "Issuer: " . $Issuer . "\n" . \
+ "Issuer: " . $Ca . $Issuer . "\n" . \
"Validity: " . $InvalidBefore . " to " . $InvalidAfter . "\n" . \
"Expires in: " . $ExpiresAfter);
:log warning ("The certificate " . $CertName . " " . $State . \