tls

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// CertRenewalInterval is the renewal interval for rootCA
	CertRenewalInterval = 12 * time.Hour
	// CAValidityDuration is the valid duration for CA certificates
	CAValidityDuration = 365 * 24 * time.Hour
	// TLSValidityDuration is the valid duration for TLS certificates
	TLSValidityDuration = 150 * 24 * time.Hour
)

Variables

View Source
var ErrorsNotFound = "root CA certificate not found"

Functions

func GenerateRootCASecretName added in v1.5.4

func GenerateRootCASecretName() string

func GenerateTLSPairSecretName added in v1.5.4

func GenerateTLSPairSecretName() string

func NewCertRenewer added in v1.3.5

func NewCertRenewer(client controllerutils.ObjectClient[*corev1.Secret], certRenewalInterval, caValidityDuration, tlsValidityDuration time.Duration, server string) *certRenewer

NewCertRenewer returns an instance of CertRenewer

func ReadRootCASecret added in v1.3.5

func ReadRootCASecret(client controllerutils.GetClient[*corev1.Secret]) ([]byte, error)

ReadRootCASecret returns the RootCA from the pre-defined secret

Types

type CertRenewer added in v1.3.5

type CertRenewer interface {
	// RenewCA renews the CA certificate if needed
	RenewCA() error
	// RenewTLS renews the TLS certificate if needed
	RenewTLS() error
}

type CertValidator added in v1.8.1

type CertValidator interface {
	// ValidateCert checks the certificates validity
	ValidateCert() (bool, error)
}

Jump to

Keyboard shortcuts

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