package keys

import "github.com/docker/compose-on-kubernetes/internal/keys"

Index

Functions

func EncodeCertPEM

func EncodeCertPEM(cert *x509.Certificate) []byte

EncodeCertPEM embed a certificate in a PEM block

Types

type CA

type CA interface {
	PrivateKey() SignerWithPEM
	Cert() *x509.Certificate
	NewSignedCert(cfg certutil.Config, publicKey crypto.PublicKey) (*x509.Certificate, error)
}

CA is a certificate authority usable to generated signed certificates

func NewSelfSignedCA

func NewSelfSignedCA(commonName string, organization []string) (CA, error)

NewSelfSignedCA creates a CA and return it with its private key

type SignerWithPEM

type SignerWithPEM interface {
	crypto.Signer
	PEM() []byte
}

SignerWithPEM is a signer implementation that has its PEM encoded representation attached

func NewRSASigner

func NewRSASigner() (SignerWithPEM, error)

NewRSASigner generates a private key suitable for a TLS cert (client or server)

Source Files

keys.go

Version
v0.5.0 (latest)
Published
Jan 28, 2022
Platform
linux/amd64
Imports
14 packages
Last checked
5 hours ago

Tools for package owners.