tls

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateGenerateRequest added in v1.1.0

func CertificateGenerateRequest(privateKey *rsa.PrivateKey, props TlsCertificateProps, fqdncn bool) (*certificates.CertificateSigningRequest, error)

CertificateGenerateRequest Generates raw certificate signing request

func GenerateInClusterServiceName

func GenerateInClusterServiceName(props TlsCertificateProps) string

GenerateInClusterServiceName The generated service name should be the common name for TLS certificate

func IsTLSPairShouldBeUpdated added in v1.1.0

func IsTLSPairShouldBeUpdated(tlsPair *TlsPemPair) bool

IsTLSPairShouldBeUpdated checks if TLS pair has expited and needs to be updated

func TLSGeneratePrivateKey added in v1.1.0

func TLSGeneratePrivateKey() (*rsa.PrivateKey, error)

TLSGeneratePrivateKey Generates RSA private key

func TLSPrivateKeyToPem added in v1.1.0

func TLSPrivateKeyToPem(rsaKey *rsa.PrivateKey) []byte

TLSPrivateKeyToPem Creates PEM block from private key object

Types

type TlsCertificateProps

type TlsCertificateProps struct {
	Service       string
	Namespace     string
	ApiServerHost string
}

TlsCertificateProps Properties of TLS certificate which should be issued for webhook server

type TlsPemPair

type TlsPemPair struct {
	Certificate []byte
	PrivateKey  []byte
}

TlsPemPair The pair of TLS certificate corresponding private key, both in PEM format

Jump to

Keyboard shortcuts

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