Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateChain ¶
type CertificateChain struct {
CAKey string `mapstructure:"caKey"`
CACert string `mapstructure:"caCert"`
ServerKey string `mapstructure:"serverKey"`
ServerCert string `mapstructure:"serverCert"`
ClientKey string `mapstructure:"clientKey"`
ClientCert string `mapstructure:"clientCert"`
PeerKey string `mapstructure:"peerKey"`
PeerCert string `mapstructure:"peerCert"`
}
CertificateChain represents a full certificate chain with a root CA, a server, client and peer certificate All values are in PEM format
func GenerateTLS ¶
func GenerateTLS(hosts string, validity string) (*CertificateChain, error)
GenerateTLS generates ca, server, client and peer TLS certificates. hosts: Comma-separated hostnames and IPs to generate a certificate for validity: Duration that certificate is valid for, in Go Duration format
Click to show internal directories.
Click to hide internal directories.