Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultValidity is 365 days DefaultValidity = 365 * 24 * time.Hour )
Functions ¶
This section is empty.
Types ¶
type Certificates ¶
type Certificates struct{ Webhook, Ca *KeyPair }
type EncodedKeyPair ¶
type EncodedKeyPair struct{ Key, Cert []byte }
func (*EncodedKeyPair) AsMap ¶
func (kp *EncodedKeyPair) AsMap() map[string][]byte
func (*EncodedKeyPair) SaveTo ¶
func (kp *EncodedKeyPair) SaveTo(dir string) error
type KeyPair ¶
type KeyPair struct { Key *rsa.PrivateKey Cert *x509.Certificate }
func GenerateKeyPair ¶
func GenerateKeyPair(config *x509.Certificate, ca *KeyPair) (*KeyPair, error)
GenerateKeyPair generates a private key and certificate for a given certificate config. If ca is nil, a new self-signed CA keypair is generated.
func (*KeyPair) Encoded ¶
func (kp *KeyPair) Encoded() (*EncodedKeyPair, error)
Encoded returns the PEM encoded key pair
Click to show internal directories.
Click to hide internal directories.