global-functions: $CertificateDownload: pass OU on exact match

This commit is contained in:
Christian Hesse 2026-08-07 14:26:07 +02:00
parent 4cac06774c
commit 384a02212d

View file

@ -172,6 +172,7 @@
:global CertificateNameByCN;
:global CleanName;
:global IfThenElse;
:global FetchUserAgentStr;
:global LogPrint;
:global RmFile;
@ -222,7 +223,8 @@
}
:foreach Cert in=[ /certificate/find where name~("^" . $FileName . "_[0-9]+\$") ] do={
$CertificateNameByCN [ /certificate/get $Cert common-name ];
$CertificateNameByCN [ $IfThenElse ([ /certificate/get $Cert unit ] = $CommonName) \
$CommonName [ /certificate/get $Cert common-name ] ];
}
:return true;
}