certdata

package
v1.0.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package certdata parses Mozilla NSS certdata.txt files.

This parser is derived from github.com/gwatts/rootcerts/certparse at revision d711a5bdf9bddbbff967bfc4bb018fe0e748fae8.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Label               string
	DER                 []byte
	ServerTrust         Trust
	ServerDistrustAfter *time.Time
}

Certificate contains a certificate and its server-authentication metadata.

func ReadCertificates

func ReadCertificates(from io.Reader) ([]Certificate, error)

ReadCertificates parses all certificate objects and associates their server-authentication trust objects by Mozilla's certificate hash.

type Trust

type Trust string

Trust is a Mozilla NSS trust level.

const (
	TrustUnspecified      Trust = ""
	TrustTrustedDelegator Trust = "CKT_NSS_TRUSTED_DELEGATOR"
	TrustMustVerify       Trust = "CKT_NSS_MUST_VERIFY_TRUST"
	TrustNotTrusted       Trust = "CKT_NSS_NOT_TRUSTED"
)

Jump to

Keyboard shortcuts

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