mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-31 00:04:51 +02:00
global-functions: $CertificateNameByCN: warn with no match
This commit is contained in:
parent
c823ff87ed
commit
d4b5e1f5e7
1 changed files with 2 additions and 0 deletions
|
@ -206,9 +206,11 @@
|
|||
:local Match [ :tostr $1 ];
|
||||
|
||||
:global CleanName;
|
||||
:global LogPrint;
|
||||
|
||||
:local Cert ([ /certificate/find where (common-name=$Match or fingerprint=$Match or name=$Match) ]->0);
|
||||
:if ([ :len $Cert ] = 0) do={
|
||||
$LogPrint warning $0 ("No matching certificate found.");
|
||||
:return false;
|
||||
}
|
||||
:local CommonName [ /certificate/get $Cert common-name ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue