certificateSigner

package
v2.7.19-test Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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