From 54af7fd024a45d96df55b860f15dc53240fb7e98 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 12 Jan 2026 08:22:24 +0100 Subject: [PATCH] check-certificates: drop workaround This revert commit 8de6995c4b38f80439f0b70dc19f747f4f58f83d. The exact example given in the commit message of that commit works as expected now: [eworm@kalyke] > $InspectVar [ $ParseKeyValueStore [ /certificate/get ISRG-Root-X2 issuer ] ]; -type-> array -key-> C -type-> str -len-> 2 -value-> US -key-> CN -type-> str -len-> 12 -value-> ISRG Root X2 -key-> O -type-> str -len-> 32 -value-> Internet Security Research Group --- check-certificates.rsc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/check-certificates.rsc b/check-certificates.rsc index db1e2d45..f3885fcf 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -106,7 +106,6 @@ :local FormatCertChain do={ :local Cert $1; - :global EitherOr; :global ParseKeyValueStore; :local CertVal [ /certificate/get $Cert ]; @@ -117,8 +116,7 @@ :local Return ""; :for I from=0 to=5 do={ - :set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \ - ([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]); + :set Return ($Return . [ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN"); :set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ]; :if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={ :return $Return;