mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 02:04:45 +02:00
check-certificates: handle formatting of self signed cert
This commit is contained in:
parent
53ff8fbf97
commit
09393d3ef5
1 changed files with 5 additions and 1 deletions
|
@ -98,8 +98,12 @@
|
|||
:global ParseKeyValueStore;
|
||||
|
||||
:local CertVal [ /certificate/get $Cert ];
|
||||
:local Return "";
|
||||
|
||||
:if ([ :typeof ($CertVal->"issuer") ] = "nothing") do={
|
||||
:return "self-signed";
|
||||
}
|
||||
|
||||
:local Return "";
|
||||
:for I from=0 to=5 do={
|
||||
:set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \
|
||||
([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue