mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-02 22:24:28 +02:00
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.
This commit is contained in:
parent
42834e9de1
commit
360d30bf2a
1 changed files with 2 additions and 1 deletions
|
@ -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 . \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue