checks

package
v0.0.0-...-9d58c27 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Certificate certificate

Certificate contains all imported certificate checks

View Source
var Extensions extensions

Extensions contains all imported extension checks

Functions

func RegisterCertificateCheck

func RegisterCertificateCheck(name string, filter *Filter, f func(*certdata.Data) *errors.Errors)

RegisterCertificateCheck adds a new check to Cerificates

func RegisterExtensionCheck

func RegisterExtensionCheck(name string, oid asn1.ObjectIdentifier, filter *Filter, f func(pkix.Extension, *certdata.Data) *errors.Errors)

RegisterExtensionCheck adds a new check to Extensions

Types

type Filter

type Filter struct {
	Type          []string
	IssuedBefore  *time.Time
	IssuedAfter   *time.Time
	ExpiresBefore *time.Time
	ExpiresAfter  *time.Time
}

Filter defines condition on when a check is performed or not

func (*Filter) Check

func (f *Filter) Check(d *certdata.Data) bool

Check returns true if a certificate complies with the given filter

Jump to

Keyboard shortcuts

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