pkix

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 SubjectKeyID(pubKey any) ([]byte, error)

func ValidateCertificate

func ValidateCertificate(cert *x509.Certificate, opts ...ValidationOption) error

Types

type KeyUsage

type KeyUsage x509.KeyUsage

func (KeyUsage) String

func (k KeyUsage) String() string

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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