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.
Click to show internal directories.
Click to hide internal directories.