Skip to content

Commit

Permalink
delete systemRootPool
Browse files Browse the repository at this point in the history
  • Loading branch information
phbnf committed Feb 25, 2025
1 parent 5ca9fd7 commit d0d68d5
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions internal/x509util/cert_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,6 @@ func (s *CertPool) Clone() *CertPool {
return p
}

// SystemCertPool returns a copy of the system cert pool.
//
// On Unix systems other than macOS the environment variables SSL_CERT_FILE and
// SSL_CERT_DIR can be used to override the system default locations for the SSL
// certificate file and SSL certificate files directory, respectively. The
// latter can be a colon-separated list.
//
// Any mutations to the returned pool are not written to disk and do not affect
// any other pool returned by SystemCertPool.
//
// New changes in the system cert pool might not be reflected in subsequent calls.
func SystemCertPool() (*CertPool, error) {
if sysRoots := systemRootsPool(); sysRoots != nil {
return sysRoots.Clone(), nil
}

return loadSystemRoots()
}

type potentialParent struct {
cert *x509.Certificate
constraint func([]*x509.Certificate) error
Expand Down

0 comments on commit d0d68d5

Please sign in to comment.