mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-06 19:25:39 +02:00
global-functions: $CertificateNameByCN: pick the first match only
This commit is contained in:
parent
e36613608c
commit
44fa91f5c4
1 changed files with 1 additions and 1 deletions
|
@ -207,7 +207,7 @@
|
||||||
|
|
||||||
:global CleanName;
|
:global CleanName;
|
||||||
|
|
||||||
:local Cert [ /certificate/find where (common-name=$Match or fingerprint=$Match or name=$Match) ];
|
:local Cert ([ /certificate/find where (common-name=$Match or fingerprint=$Match or name=$Match) ]->0);
|
||||||
:local CommonName [ /certificate/get $Cert common-name ];
|
:local CommonName [ /certificate/get $Cert common-name ];
|
||||||
/certificate/set $Cert name=[ $CleanName $CommonName ];
|
/certificate/set $Cert name=[ $CleanName $CommonName ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue