From 44fa91f5c47ec739a7f74aa2861ab58cc42bed39 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 7 Apr 2025 15:05:27 +0200 Subject: [PATCH] global-functions: $CertificateNameByCN: pick the first match only --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index f73ea14..7b1c214 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -207,7 +207,7 @@ :global CleanName; - :local Cert [ /certificate/find where (common-name=$Match or fingerprint=$Match or name=$Match) ]; + :local Cert ([ /certificate/find where (common-name=$Match or fingerprint=$Match or name=$Match) ]->0); :local CommonName [ /certificate/get $Cert common-name ]; /certificate/set $Cert name=[ $CleanName $CommonName ]; }