mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-12 17:09:36 +00:00
check-certificates: skip common-name if not available
This commit is contained in:
parent
491189ece4
commit
0d5ee6cf23
1 changed files with 5 additions and 3 deletions
|
|
@ -177,9 +177,11 @@
|
|||
$LogPrint info $ScriptName ("Attempting to renew certificate '" . ($CertVal->"name") . "'.");
|
||||
|
||||
:local ImportSuccess false;
|
||||
:set LastName ($CertVal->"common-name");
|
||||
:set FetchName $LastName;
|
||||
:set ImportSuccess [ $CheckCertificatesDownloadImport $ScriptName $LastName $FetchName ];
|
||||
:if ([ :len ($CertVal->"common-name") ] > 0) do={
|
||||
:set LastName ($CertVal->"common-name");
|
||||
:set FetchName $LastName;
|
||||
:set ImportSuccess [ $CheckCertificatesDownloadImport $ScriptName $LastName $FetchName ];
|
||||
}
|
||||
:foreach SAN in=($CertVal->"subject-alt-name") do={
|
||||
:if ($ImportSuccess = false) do={
|
||||
:set LastName [ :pick $SAN ([ :find $SAN ":" ] + 1) [ :len $SAN ] ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue