selfsigned

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLSCACert = "ca.crt"
	TLSCAKey  = "ca.key"
)

Variables

This section is empty.

Functions

func DumpCASecret

func DumpCASecret(c kubernetes.Interface, namespace, name string, caCertData, caKeyData []byte) (bool, error)

func DumpSecret

func DumpSecret(c client.Client, namespace, name string, caData, certData, keyData []byte) error

Types

type CertPair

type CertPair struct {
	Key  crypto.Signer
	Cert *x509.Certificate
}

func (CertPair) AsBytes

func (k CertPair) AsBytes() (cert []byte, key []byte, err error)

func (CertPair) CertBytes

func (k CertPair) CertBytes() []byte

type CertRotation

type CertRotation interface {
	EnsureTargetCertKeyPair(signingCertKeyPair *openshiftcrypto.CA, caBundleCerts []*x509.Certificate, fns ...openshiftcrypto.CertificateExtensionFunc) error
}

type SelfSigner

type SelfSigner interface {
	Sign(cfg cert.Config, expiry time.Duration) (CertPair, error)
	CAData() []byte
	GetSigner() crypto.Signer
	CA() *openshiftcrypto.CA
}

func NewGeneratedSelfSigner

func NewGeneratedSelfSigner() (SelfSigner, error)

func NewSelfSignerFromSecretOrGenerate

func NewSelfSignerFromSecretOrGenerate(c kubernetes.Interface, secretNamespace, secretName string) (SelfSigner, error)

func NewSelfSignerWithCA

func NewSelfSignerWithCA(caCert *x509.Certificate, caKey *rsa.PrivateKey, nextSerial *big.Int) (SelfSigner, error)

func NewSelfSignerWithCAData

func NewSelfSignerWithCAData(caCertData, caKeyData []byte) (SelfSigner, error)

Jump to

Keyboard shortcuts

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