From d4b5e1f5e7acb59bc365c6598749d1ec15c8cd36 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 10 Apr 2025 11:07:59 +0200 Subject: [PATCH] global-functions: $CertificateNameByCN: warn with no match --- global-functions.rsc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index d014567..70269c8 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -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 ];