From dad56fa423b9a188667ce978bef455b0313d4252 Mon Sep 17 00:00:00 2001 From: LeSingh1 Date: Tue, 19 May 2026 10:35:43 -0700 Subject: [PATCH] Skip CRL file when parsing fails to avoid nil dereference If x509.ParseCRL returns an error, certList is nil and the subsequent access to certList.TBSCertList.Extensions panics. The error was logged but the loop continued processing the failed CRL. Skip to the next file after logging instead. --- pkg/smokescreen/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/smokescreen/config.go b/pkg/smokescreen/config.go index 1c5a8103..840ae39e 100644 --- a/pkg/smokescreen/config.go +++ b/pkg/smokescreen/config.go @@ -482,6 +482,7 @@ func (config *Config) SetupCrls(crlFiles []string) error { certList, err := x509.ParseCRL(crlBytes) if err != nil { log.Printf("Failed to parse CRL in '%s': %#v\n", crlFile, err) + continue } // find the X509v3 Authority Key Identifier in the extensions (2.5.29.35)