certificateSigner

package
v2.24.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 11 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

func NewIdentityCertificateSigner

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

func (*CertificateSigner) Sign

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

type Opt

type Opt = func(cfg *SignerConfig)

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
	OverrideCertTemplate func(template *x509.Certificate) error
}

Jump to

Keyboard shortcuts

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