From 713369e8ddb2f33c35f382d9474c60cf08255cfb Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Aug 2026 14:26:07 +0200 Subject: [PATCH] global-functions: $CertificateDownload: pass OU on exact match --- global-functions.rsc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 6ec428cc..cd00c76c 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -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; }