cert

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CAKeyName is the name of the CA private key
	CAKeyName = "ca.key"
	// CACertName is the name of the CA certificate
	CACertName = "ca.crt"
	// ServerKeyName is the name of the server private key
	ServerKeyName = "tls.key"
	// ServerCertName is the name of the serving certificate
	ServerCertName = "tls.crt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AfterCheckFunc

type AfterCheckFunc func(cert *Certificate, needsUpdate bool) error

type Certificate

type Certificate struct {
	// PEM encoded private key
	Key []byte
	// PEM encoded serving certificate
	Cert []byte
	// PEM encoded CA private key
	CAKey []byte
	// PEM encoded CA certificate
	CACert []byte
}

func ReadCertificate

func ReadCertificate(dir string) (*Certificate, error)

func (*Certificate) Read

func (cert *Certificate) Read(dir string) (*Certificate, error)

func (*Certificate) Verify

func (cert *Certificate) Verify(dnsName string, checkTime time.Time) bool

func (Certificate) Write

func (cert Certificate) Write(dir string) error

type Provisioner

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

func NewCertProvisioner

func NewCertProvisioner(log logr.Logger, dnsNames []string, certDir string, afterCheckFuncs ...AfterCheckFunc) *Provisioner

func (*Provisioner) Init

func (p *Provisioner) Init() error

func (*Provisioner) RegisterAfterGenerationFunc

func (p *Provisioner) RegisterAfterGenerationFunc(f AfterCheckFunc)

func (*Provisioner) SetDNSNames

func (p *Provisioner) SetDNSNames(dnsNames []string)

func (*Provisioner) Start

func (p *Provisioner) Start(ctx context.Context, trigger <-chan struct{}) error

Jump to

Keyboard shortcuts

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