Documentation ¶
Index ¶
- Variables
- func SubjectKeyID(pubKey any) ([]byte, error)
- func ValidateCertificate(cert *x509.Certificate, opts ...ValidationOption) error
- type KeyUsage
- type ValidationOption
- func WithCurrentTime(time time.Time) ValidationOption
- func WithDNSName(dnsName string) ValidationOption
- func WithExtendedKeyUsage(usage x509.ExtKeyUsage) ValidationOption
- func WithIntermediateCACertificates(certs []*x509.Certificate) ValidationOption
- func WithKeyUsage(usage x509.KeyUsage) ValidationOption
- func WithRootCACertificates(certs []*x509.Certificate) ValidationOption
- func WithSystemTrustStore() ValidationOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCertificateValidation = errors.New("certificate validation error") ErrMissingKeyUsage = errors.New("missing key usage") )
Functions ¶
func SubjectKeyID ¶
func ValidateCertificate ¶
func ValidateCertificate(cert *x509.Certificate, opts ...ValidationOption) error
Types ¶
type ValidationOption ¶
type ValidationOption func(opts *options) error
func WithCurrentTime ¶
func WithCurrentTime(time time.Time) ValidationOption
func WithDNSName ¶
func WithDNSName(dnsName string) ValidationOption
func WithExtendedKeyUsage ¶
func WithExtendedKeyUsage(usage x509.ExtKeyUsage) ValidationOption
func WithIntermediateCACertificates ¶
func WithIntermediateCACertificates(certs []*x509.Certificate) ValidationOption
func WithKeyUsage ¶
func WithKeyUsage(usage x509.KeyUsage) ValidationOption
func WithRootCACertificates ¶
func WithRootCACertificates(certs []*x509.Certificate) ValidationOption
func WithSystemTrustStore ¶
func WithSystemTrustStore() ValidationOption
Click to show internal directories.
Click to hide internal directories.