Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConstraintError ¶
ConstraintError is the typed error that will be returned if a constraint error is found.
func (ConstraintError) As ¶
func (e ConstraintError) As(v any) bool
As implements the As(any) bool interface and allows to use "errors.As()" to convert the ConstraintError to an errs.Error.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine implements a constraint validator for DNS names, IP addresses, Email addresses and URIs.
func New ¶
func New(chain ...*x509.Certificate) *Engine
New creates a constraint validation engine that contains the given chain of certificates.
func (*Engine) Validate ¶
func (e *Engine) Validate(dnsNames []string, ipAddresses []net.IP, emailAddresses []string, uris []*url.URL) error
Validate checks the given names with the name constraints defined in the service.
func (*Engine) ValidateCertificate ¶
func (e *Engine) ValidateCertificate(cert *x509.Certificate) error
ValidateCertificate validates the DNS names, IP addresses, Email addresses and URIs present in the given certificate.