internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateToPEM

func CertificateToPEM(b []byte) ([]byte, error)

func CertificatesToPEM

func CertificatesToPEM(bs [][]byte) ([]byte, error)

func CreateCA

func CreateCA(subject string, keyType KeyType, keySize, days int) (privateKey crypto.PrivateKey, publicKey crypto.PublicKey, cert []byte, err error)

func CreateClient

func CreateClient(subject string, keyType KeyType, keySize, days int, caCert *x509.Certificate, caKey crypto.PrivateKey) (privateKey crypto.PrivateKey, cert []byte, err error)

func GenerateBootstrapToken

func GenerateBootstrapToken() (string, error)

func GenerateCertsEncryptionKey

func GenerateCertsEncryptionKey() (string, error)

func GenerateKubeconfig

func GenerateKubeconfig(caCertPEM, clientCertPEM, clientKeyPEM []byte, address string) ([]byte, error)

func PrivateKeyToPEM

func PrivateKeyToPEM(privateKey interface{}) ([]byte, error)

func PublicPEMToDER

func PublicPEMToDER(pubKeyPEM []byte) ([]byte, error)

Types

type KeyType

type KeyType int
const (
	RSA KeyType = iota
	Ed25519
	ECDSA
)

Jump to

Keyboard shortcuts

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