Documentation
¶
Overview ¶
Package validation_data gathers what a validator needs to check a certificate long after the fact: every certificate up to a root, and a CRL for each one below it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoIssuer = errors.New("no issuer found") ErrNoCurrentCrl = errors.New("no current crl found") ErrRevoked = errors.New("certificate revoked") ErrChainTooLong = errors.New("certificate chain too long") )
Errors about the certificates being collected for; they are the sealer's own and its authority's, so none is classed as client input.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
Certificates []*x509.Certificate
Crls [][]byte
// CrlSource, when set, issues further CRLs at collection time, as a CA under test can.
CrlSource func(now time.Time) ([][]byte, error)
FetchOptions []fetch_config.Option
Now func() time.Time
}
Collector finds issuers and CRLs among what it is given first, and fetches the rest from the URLs the certificates name.
func (*Collector) Collect ¶
func (c *Collector) Collect(ctx context.Context, certificates ...*x509.Certificate) (*ValidationData, error)
Collect walks each certificate up to a self-signed root, gathering every certificate on the way and a current CRL for each one that is not a root. A self-signed certificate is a chain of its own, root or not, and needs no CRL.
type ValidationData ¶
type ValidationData struct {
Certificates []*x509.Certificate
Crls [][]byte
}
ValidationData is the certificates and CRLs that go into a PDF's DSS.