certificateSigner

package
v2.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtendedKeyUsage_IDENTITY_CERTIFICATE = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 44924, 1, 6}

Functions

This section is empty.

Types

type CertificateSigner

type CertificateSigner struct {
	// contains filtered or unexported fields
}

func New

func New(caCert []*x509.Certificate, caKey crypto.PrivateKey, opts ...Opt) (*CertificateSigner, error)

func NewIdentityCertificateSigner

func NewIdentityCertificateSigner(caCert []*x509.Certificate, caKey crypto.PrivateKey, opts ...Opt) (*CertificateSigner, error)

func (*CertificateSigner) Sign

func (s *CertificateSigner) Sign(_ context.Context, csr []byte) ([]byte, error)

type Opt

type Opt = func(cfg *SignerConfig)

func WithCRLDistributionPoints added in v2.25.0

func WithCRLDistributionPoints(crlDistributionPoints []string) Opt

func WithNotAfter

func WithNotAfter(validNotAfter time.Time) Opt

func WithNotBefore

func WithNotBefore(validNotBefore time.Time) Opt

func WithOverrideCertTemplate

func WithOverrideCertTemplate(overrideCertTemplate func(template *x509.Certificate) error) Opt

type SignerConfig

type SignerConfig struct {
	ValidNotBefore        time.Time
	ValidNotAfter         time.Time
	CRLDistributionPoints []string
	OverrideCertTemplate  func(template *x509.Certificate) error
}

func (*SignerConfig) Validate added in v2.25.0

func (c *SignerConfig) Validate() error

Jump to

Keyboard shortcuts

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