certs

package
v0.0.0-...-ddadb11 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnnotateConnectionToken

func AnnotateConnectionToken(secret *corev1.Secret, role string, host string, port string)

func CertDataToSecret

func CertDataToSecret(name string, certData CertificateData, annotations map[string]string) corev1.Secret

func DecodeCertificate

func DecodeCertificate(data []byte) (*x509.Certificate, error)

func GenerateCASecret

func GenerateCASecret(name string, subject string) corev1.Secret

func GenerateSecret

func GenerateSecret(name string, subject string, hosts string, ca *corev1.Secret) corev1.Secret

func GenerateSecretFile

func GenerateSecretFile(secretFile string, secret *corev1.Secret, localOnly bool) error

func GenerateSecretWithExpiration

func GenerateSecretWithExpiration(name string, subject string, hosts string, expiration time.Duration, ca *corev1.Secret) corev1.Secret

func GenerateSimpleSecret

func GenerateSimpleSecret(name string, ca *corev1.Secret) corev1.Secret

func GetTlsCrtHostnames

func GetTlsCrtHostnames(tlscrtData []byte) (subject string, hostnames []string, err error)

Types

type CertificateAuthority

type CertificateAuthority struct {
	Certificate *x509.Certificate
	Key         interface{}
	CrtData     []byte
}

type CertificateData

type CertificateData map[string][]byte

func SecretToCertData

func SecretToCertData(secret corev1.Secret) CertificateData

type TlsConfigRetriever

type TlsConfigRetriever struct {
	Cert   string
	Key    string
	Ca     string
	Verify bool
}

func GetTlsConfigRetriever

func GetTlsConfigRetriever(verify bool, cert, key, ca string) *TlsConfigRetriever

func (*TlsConfigRetriever) GetTlsConfig

func (paths *TlsConfigRetriever) GetTlsConfig() (*tls.Config, error)

Jump to

Keyboard shortcuts

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