testutil

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertKeyPair

type CertKeyPair struct {
	CertBytes  []byte
	PrivateKey rsa.PrivateKey
}

CertKeyPair holds a pair certificate bytes and its corresponding rsa.PrivateKey.

func (*CertKeyPair) EncodeAndWrite

func (c *CertKeyPair) EncodeAndWrite(dir string, certFileName, keyFileName string) error

EncodeAndWrite encodes the certificates and private key in PEM format and writes it to the provided directory.

type TLSResourceCreator

type TLSResourceCreator struct {
	// contains filtered or unexported fields
}

TLSResourceCreator is a creator for TLS resources

func NewTLSResourceCreator

func NewTLSResourceCreator() (*TLSResourceCreator, error)

NewTLSResourceCreator creates a new instance of TLSResourceCreator

func (*TLSResourceCreator) CreateCACertAndKey

func (t *TLSResourceCreator) CreateCACertAndKey() (*CertKeyPair, error)

CreateCACertAndKey creates a CA certificate and its private key.

func (*TLSResourceCreator) CreateETCDClientCertAndKey

func (t *TLSResourceCreator) CreateETCDClientCertAndKey() (*CertKeyPair, error)

CreateETCDClientCertAndKey creates a ETCD client certificate and its private key.

Jump to

Keyboard shortcuts

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