mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
check-certificates: handle formatting of self signed cert
This commit is contained in:
parent
53ff8fbf97
commit
09393d3ef5
|
@ -98,8 +98,12 @@
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
|
|
||||||
:local CertVal [ /certificate/get $Cert ];
|
: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={
|
:for I from=0 to=5 do={
|
||||||
:set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \
|
:set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \
|
||||||
([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]);
|
([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]);
|
||||||
|
|
Loading…
Reference in a new issue