check-certificates: drop workaround

This revert commit 8de6995c4b.

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
This commit is contained in:
Christian Hesse 2026-01-12 08:22:24 +01:00
parent 927edc639c
commit 54af7fd024

View file

@ -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;