certificate

package
v1.0.6-2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 17 Imported by: ? modules, 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

This section is empty.

Functions

This section is empty.

Types

type CertificateManager

type CertificateManager struct {
	Client k8sclient.Client
	Scheme *runtime.Scheme
}

func New

func New(client k8sclient.Client, scheme *runtime.Scheme) *CertificateManager

func (*CertificateManager) CertificateExpiring

func (c *CertificateManager) CertificateExpiring(certType common.SecretType, instance v1.Object, numSecondsBeforeExpire int64) (expiring bool, expireDate time.Time, err error)

func (*CertificateManager) CheckCertificatesForExpire

func (c *CertificateManager) CheckCertificatesForExpire(instance v1.Object, numSecondsBeforeExpire int64) (statusType current.IBPCRStatusType, message string, err error)

func (*CertificateManager) Expires

func (c *CertificateManager) Expires(cert []byte, numSecondsBeforeExpire int64) (expiring bool, expireDate time.Time, err error)

func (*CertificateManager) GetDurationToNextRenewal

func (c *CertificateManager) GetDurationToNextRenewal(certType common.SecretType, instance v1.Object, numSecondsBeforeExpire int64) (time.Duration, error)

func (*CertificateManager) GetDurationToNextRenewalForCert

func (c *CertificateManager) GetDurationToNextRenewalForCert(certName string, cert []byte, instance v1.Object, numSecondsBeforeExpire int64) (time.Duration, error)

func (*CertificateManager) GetExpireDate

func (c *CertificateManager) GetExpireDate(pemBytes []byte) (time.Time, error)

func (*CertificateManager) GetKey

func (c *CertificateManager) GetKey(name, namespace string) ([]byte, error)

func (*CertificateManager) GetReenroller

func (c *CertificateManager) GetReenroller(certType common.SecretType, spec *current.EnrollmentSpec, bccsp *commonapi.BCCSP, storagePath string, certPemBytes, keyPemBytes []byte, hsmEnabled bool, newKey bool) (Reenroller, error)

func (*CertificateManager) GetSecret

func (c *CertificateManager) GetSecret(name, namespace string) (*corev1.Secret, error)

func (*CertificateManager) GetSignCert

func (c *CertificateManager) GetSignCert(name, namespace string) ([]byte, error)

func (*CertificateManager) GetSignCertAndKey

func (c *CertificateManager) GetSignCertAndKey(certType common.SecretType, instance v1.Object, hsmEnabled bool) ([]byte, []byte, error)

func (*CertificateManager) ReenrollCert

func (c *CertificateManager) ReenrollCert(certType common.SecretType, reenroller Reenroller, instance v1.Object, hsmEnabled bool) error

func (*CertificateManager) RenewCert

func (c *CertificateManager) RenewCert(certType common.SecretType, instance Instance, spec *current.EnrollmentSpec, bccsp *commonapi.BCCSP, storagePath string, hsmEnabled bool, newKey bool) error

func (*CertificateManager) UpdateKey

func (c *CertificateManager) UpdateKey(name string, key []byte, instance v1.Object) error

func (*CertificateManager) UpdateSecret

func (c *CertificateManager) UpdateSecret(instance v1.Object, name string, data map[string][]byte) error

func (*CertificateManager) UpdateSignCert

func (c *CertificateManager) UpdateSignCert(name string, cert []byte, instance v1.Object) error

type Instance

type Instance interface {
	v1.Object
	UsingHSMProxy() bool
	IsHSMEnabled() bool
	EnrollerImage() string
	GetPullSecrets() []corev1.LocalObjectReference
	GetResource(current.Component) corev1.ResourceRequirements
	PVCName() string
}

type Reenroller

type Reenroller interface {
	Reenroll() (*config.Response, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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