mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-23 04:14:27 +02:00
global-functions: $CertificateNameByCN: return false without match...
... and return true on success.
This commit is contained in:
parent
44fa91f5c4
commit
c823ff87ed
1 changed files with 4 additions and 0 deletions
|
@ -208,8 +208,12 @@
|
|||
:global CleanName;
|
||||
|
||||
:local Cert ([ /certificate/find where (common-name=$Match or fingerprint=$Match or name=$Match) ]->0);
|
||||
:if ([ :len $Cert ] = 0) do={
|
||||
:return false;
|
||||
}
|
||||
:local CommonName [ /certificate/get $Cert common-name ];
|
||||
/certificate/set $Cert name=[ $CleanName $CommonName ];
|
||||
:return true;
|
||||
}
|
||||
|
||||
# multiply given character(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue