verify/verify.go: fix nil point deref

This commit is contained in:
2025-11-18 20:55:41 -08:00
parent 3e80e46c17
commit f5917ac6fc

View File

@@ -48,7 +48,9 @@ func prepareVerification(w io.Writer, target string, opts *Opts) (*verifyResult,
Config: lib.StrictBaselineTLSConfig(),
ForceIntermediates: false,
}
}
if opts.Config.RootCAs == nil {
roots, err = x509.SystemCertPool()
if err != nil {
return nil, fmt.Errorf("couldn't load system cert pool: %w", err)