From 8c1459772131f7ab761f7dbe3d78a6055b44ba7a Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Fri, 29 Oct 2021 09:28:39 -0400 Subject: [PATCH] Add IsPreCert to CertInfo --- helpers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers.go b/helpers.go index 4b5f474..9f7c479 100644 --- a/helpers.go +++ b/helpers.go @@ -124,6 +124,7 @@ type CertInfo struct { ValidityParseError error IsCA *bool IsCAParseError error + IsPreCert bool } func MakeCertInfoFromTBS(tbs *TBSCertificate) *CertInfo { @@ -135,6 +136,7 @@ func MakeCertInfoFromTBS(tbs *TBSCertificate) *CertInfo { info.SerialNumber, info.SerialNumberParseError = tbs.ParseSerialNumber() info.Validity, info.ValidityParseError = tbs.ParseValidity() info.IsCA, info.IsCAParseError = tbs.ParseBasicConstraints() + info.IsPreCert = len(tbs.GetExtension(oidExtensionCTPoison)) > 0 return info }