Documentation
¶
Index ¶
- Variables
- func ToFloat64(v any) (float64, bool)
- func ToInt(v any) (int, bool)
- type AKIMatchesSKI
- type Absent
- type After
- type Before
- type CRLNotExpired
- type CRLSignedBy
- type CRLValid
- type CertificatePolicyValid
- type Contains
- type ContextOption
- type EKUClientAuth
- type EKUContains
- type EKUNotContains
- type EKUServerAuth
- type Eq
- type EvaluationContext
- type Gt
- type Gte
- type In
- type IsCritical
- type IsEmpty
- type IssuedBy
- type KeyUsageCA
- type KeyUsageLeaf
- type Lt
- type Lte
- type Matches
- type MaxLength
- type MinLength
- type NameConstraintsValid
- type Neq
- type NoUniqueIdentifiers
- type NoUnknownCriticalExtensions
- type NotCritical
- type NotEmpty
- type NotIn
- type NotRegex
- type NotRevoked
- type NotRevokedOCSP
- type OCSPGood
- type OCSPValid
- type Odd
- type Operator
- type PathLenValid
- type Positive
- type Present
- type Regex
- type Registry
- type SANRequiredIfEmptySubject
- type SerialNumberUnique
- type SignatureAlgorithmMatchesTBS
- type SignatureValid
- type ValidityOrderCorrect
- type ValidityPeriodDays
Constants ¶
This section is empty.
Variables ¶
View Source
var All = []Operator{ Eq{}, Neq{}, Present{}, Absent{}, Gte{}, Gt{}, Lte{}, Lt{}, In{}, NotIn{}, Contains{}, Before{}, After{}, Matches{}, Positive{}, Odd{}, MaxLength{}, MinLength{}, IsCritical{}, NotCritical{}, IsEmpty{}, NotEmpty{}, Regex{}, NotRegex{}, SignatureValid{}, IssuedBy{}, AKIMatchesSKI{}, PathLenValid{}, ValidityPeriodDays{}, ValidityOrderCorrect{}, SignatureAlgorithmMatchesTBS{}, NoUnknownCriticalExtensions{}, SANRequiredIfEmptySubject{}, KeyUsageCA{}, KeyUsageLeaf{}, EKUContains{}, EKUNotContains{}, EKUServerAuth{}, EKUClientAuth{}, NoUniqueIdentifiers{}, SerialNumberUnique{}, CRLValid{}, CRLNotExpired{}, CRLSignedBy{}, NotRevoked{}, OCSPValid{}, NotRevokedOCSP{}, OCSPGood{}, NameConstraintsValid{}, CertificatePolicyValid{}, }
Functions ¶
Types ¶
type AKIMatchesSKI ¶
type AKIMatchesSKI struct{}
func (AKIMatchesSKI) Evaluate ¶
func (AKIMatchesSKI) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (AKIMatchesSKI) Name ¶
func (AKIMatchesSKI) Name() string
type CRLNotExpired ¶
type CRLNotExpired struct{}
func (CRLNotExpired) Evaluate ¶
func (CRLNotExpired) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (CRLNotExpired) Name ¶
func (CRLNotExpired) Name() string
type CRLSignedBy ¶
type CRLSignedBy struct{}
func (CRLSignedBy) Evaluate ¶
func (CRLSignedBy) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (CRLSignedBy) Name ¶
func (CRLSignedBy) Name() string
type CertificatePolicyValid ¶
type CertificatePolicyValid struct{}
func (CertificatePolicyValid) Evaluate ¶
func (CertificatePolicyValid) Evaluate(_ *node.Node, ctx *EvaluationContext, operands []any) (bool, error)
func (CertificatePolicyValid) Name ¶
func (CertificatePolicyValid) Name() string
type ContextOption ¶
type ContextOption func(*EvaluationContext)
func WithCRLs ¶
func WithCRLs(crls []*crl.Info) ContextOption
func WithOCSPs ¶
func WithOCSPs(ocsps []*ocsp.Info) ContextOption
type EKUClientAuth ¶
type EKUClientAuth struct{}
func (EKUClientAuth) Evaluate ¶
func (EKUClientAuth) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (EKUClientAuth) Name ¶
func (EKUClientAuth) Name() string
type EKUContains ¶
type EKUContains struct{}
func (EKUContains) Evaluate ¶
func (EKUContains) Evaluate(_ *node.Node, ctx *EvaluationContext, operands []any) (bool, error)
func (EKUContains) Name ¶
func (EKUContains) Name() string
type EKUNotContains ¶
type EKUNotContains struct{}
func (EKUNotContains) Evaluate ¶
func (EKUNotContains) Evaluate(_ *node.Node, ctx *EvaluationContext, operands []any) (bool, error)
func (EKUNotContains) Name ¶
func (EKUNotContains) Name() string
type EKUServerAuth ¶
type EKUServerAuth struct{}
func (EKUServerAuth) Evaluate ¶
func (EKUServerAuth) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (EKUServerAuth) Name ¶
func (EKUServerAuth) Name() string
type EvaluationContext ¶
type EvaluationContext struct {
Root *node.Node
Now time.Time
Cert *cert.Info
Chain []*cert.Info
CRLs []*crl.Info
OCSPs []*ocsp.Info
}
func NewEvaluationContext ¶
func NewEvaluationContext(root *node.Node, c *cert.Info, chain []*cert.Info, opts ...ContextOption) *EvaluationContext
func (*EvaluationContext) HasCRLs ¶ added in v1.1.1
func (ctx *EvaluationContext) HasCRLs() bool
func (*EvaluationContext) HasCert ¶ added in v1.1.1
func (ctx *EvaluationContext) HasCert() bool
func (*EvaluationContext) HasChain ¶ added in v1.1.1
func (ctx *EvaluationContext) HasChain() bool
func (*EvaluationContext) HasOCSPs ¶ added in v1.1.1
func (ctx *EvaluationContext) HasOCSPs() bool
type IsCritical ¶
type IsCritical struct{}
func (IsCritical) Evaluate ¶
func (IsCritical) Evaluate(n *node.Node, _ *EvaluationContext, _ []any) (bool, error)
func (IsCritical) Name ¶
func (IsCritical) Name() string
type KeyUsageCA ¶
type KeyUsageCA struct{}
func (KeyUsageCA) Evaluate ¶
func (KeyUsageCA) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (KeyUsageCA) Name ¶
func (KeyUsageCA) Name() string
type KeyUsageLeaf ¶
type KeyUsageLeaf struct{}
func (KeyUsageLeaf) Evaluate ¶
func (KeyUsageLeaf) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (KeyUsageLeaf) Name ¶
func (KeyUsageLeaf) Name() string
type NameConstraintsValid ¶
type NameConstraintsValid struct{}
func (NameConstraintsValid) Evaluate ¶
func (NameConstraintsValid) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (NameConstraintsValid) Name ¶
func (NameConstraintsValid) Name() string
type NoUniqueIdentifiers ¶
type NoUniqueIdentifiers struct{}
func (NoUniqueIdentifiers) Evaluate ¶
func (NoUniqueIdentifiers) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (NoUniqueIdentifiers) Name ¶
func (NoUniqueIdentifiers) Name() string
type NoUnknownCriticalExtensions ¶
type NoUnknownCriticalExtensions struct{}
func (NoUnknownCriticalExtensions) Evaluate ¶
func (NoUnknownCriticalExtensions) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (NoUnknownCriticalExtensions) Name ¶
func (NoUnknownCriticalExtensions) Name() string
type NotCritical ¶
type NotCritical struct{}
func (NotCritical) Evaluate ¶
func (NotCritical) Evaluate(n *node.Node, _ *EvaluationContext, _ []any) (bool, error)
func (NotCritical) Name ¶
func (NotCritical) Name() string
type NotRevoked ¶
type NotRevoked struct{}
func (NotRevoked) Evaluate ¶
func (NotRevoked) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (NotRevoked) Name ¶
func (NotRevoked) Name() string
type NotRevokedOCSP ¶
type NotRevokedOCSP struct{}
func (NotRevokedOCSP) Evaluate ¶
func (NotRevokedOCSP) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (NotRevokedOCSP) Name ¶
func (NotRevokedOCSP) Name() string
type PathLenValid ¶
type PathLenValid struct{}
func (PathLenValid) Evaluate ¶
func (PathLenValid) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (PathLenValid) Name ¶
func (PathLenValid) Name() string
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func DefaultRegistry ¶
func DefaultRegistry() *Registry
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) RegisterAll ¶
type SANRequiredIfEmptySubject ¶
type SANRequiredIfEmptySubject struct{}
func (SANRequiredIfEmptySubject) Evaluate ¶
func (SANRequiredIfEmptySubject) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (SANRequiredIfEmptySubject) Name ¶
func (SANRequiredIfEmptySubject) Name() string
type SerialNumberUnique ¶
type SerialNumberUnique struct{}
func (SerialNumberUnique) Evaluate ¶
func (SerialNumberUnique) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (SerialNumberUnique) Name ¶
func (SerialNumberUnique) Name() string
type SignatureAlgorithmMatchesTBS ¶
type SignatureAlgorithmMatchesTBS struct{}
func (SignatureAlgorithmMatchesTBS) Evaluate ¶
func (SignatureAlgorithmMatchesTBS) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (SignatureAlgorithmMatchesTBS) Name ¶
func (SignatureAlgorithmMatchesTBS) Name() string
type SignatureValid ¶
type SignatureValid struct{}
func (SignatureValid) Evaluate ¶
func (SignatureValid) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (SignatureValid) Name ¶
func (SignatureValid) Name() string
type ValidityOrderCorrect ¶
type ValidityOrderCorrect struct{}
func (ValidityOrderCorrect) Evaluate ¶
func (ValidityOrderCorrect) Evaluate(_ *node.Node, ctx *EvaluationContext, _ []any) (bool, error)
func (ValidityOrderCorrect) Name ¶
func (ValidityOrderCorrect) Name() string
type ValidityPeriodDays ¶
type ValidityPeriodDays struct{}
func (ValidityPeriodDays) Evaluate ¶
func (ValidityPeriodDays) Evaluate(n *node.Node, ctx *EvaluationContext, operands []any) (bool, error)
func (ValidityPeriodDays) Name ¶
func (ValidityPeriodDays) Name() string
Click to show internal directories.
Click to hide internal directories.