mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-08-05 02:34:36 +02:00
global-functions: split off $FormatMultiLines ...
... to format multiple lines from an array.
This commit is contained in:
parent
557823c5c1
commit
4ddc6be585
2 changed files with 23 additions and 8 deletions
|
@ -78,6 +78,7 @@
|
|||
:local CertVal $1;
|
||||
|
||||
:global FormatLine;
|
||||
:global FormatMultiLines;
|
||||
:global IfThenElse;
|
||||
:global ParseKeyValueStore;
|
||||
|
||||
|
@ -89,7 +90,7 @@
|
|||
:return ( \
|
||||
[ $FormatLine "Name" ($CertVal->"name") ] . "\n" . \
|
||||
[ $IfThenElse ([ :len ($CertVal->"common-name") ] > 0) ([ $FormatLine "CommonName" ($CertVal->"common-name") ] . "\n") ] . \
|
||||
[ $IfThenElse ([ :len ($CertVal->"subject-alt-name") ] > 0) ([ $FormatLine "SubjectAltNames" ($CertVal->"subject-alt-name") ] . "\n") ] . \
|
||||
[ $IfThenElse ([ :len ($CertVal->"subject-alt-name") ] > 0) ([ $FormatMultiLines "SubjectAltNames" ($CertVal->"subject-alt-name") ] . "\n") ] . \
|
||||
[ $FormatLine "Private key" [ $IfThenElse (($CertVal->"private-key") = true) "available" "missing" ] ] . "\n" . \
|
||||
[ $FormatLine "Fingerprint" ($CertVal->"fingerprint") ] . "\n" . \
|
||||
[ $FormatLine "Issuer" ($CertVal->"ca" . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN")) ] . "\n" . \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue