bundle

package
v0.0.0-...-2beaa59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package bundle contains the bundle of root certificates parsed from the NSS trust store, using x509roots/nss.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Roots

func Roots() iter.Seq[Root]

Roots returns the bundle of root certificates from the NSS trust store. The [Root.Certificate] slice must be treated as read-only and should not be modified.

Types

type Root

type Root struct {
	// Certificate is the DER-encoded certificate (read-only; do not modify!).
	Certificate []byte

	// Constraint is nil if the root is unconstrained. If Constraint is non-nil,
	// the certificate has additional constraints that cannot be encoded in
	// X.509, and when building a certificate chain anchored with this root the
	// chain should be passed to this function to check its validity. If using a
	// [crypto/x509.CertPool] the root should be added using
	// [crypto/x509.CertPool.AddCertWithConstraint].
	Constraint func([]*x509.Certificate) error
}

Root represents a root certificate parsed from the NSS trust store.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL