Documentation ¶
Index ¶
- func CertFromCa(config *CertConfig, caCert tls.Certificate) (cert tls.Certificate, err error)
- func CreateCA(config *CertConfig) (caCert tls.Certificate, err error)
- func LoadCertOrCreateCert(config *LoadConfig, persistCerts bool) (cert, caCert tls.Certificate, err error)
- func LoadOrCreateTLS(config *LoadConfig, persistCerts bool) (tlsConfig *tls.Config, err error)
- type CertConfig
- type LoadConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertFromCa ¶
func CertFromCa(config *CertConfig, caCert tls.Certificate) (cert tls.Certificate, err error)
Creates a certificate signed by the given CA certificate.
func CreateCA ¶
func CreateCA(config *CertConfig) (caCert tls.Certificate, err error)
func LoadCertOrCreateCert ¶
func LoadCertOrCreateCert(config *LoadConfig, persistCerts bool) (cert, caCert tls.Certificate, err error)
Loads the given certs or creates self-signed ones if they don't exist.
func LoadOrCreateTLS ¶
func LoadOrCreateTLS(config *LoadConfig, persistCerts bool) (tlsConfig *tls.Config, err error)
Loads the given TLS config or creates a self-signed one if it doesn't exist.
Types ¶
type CertConfig ¶
type LoadConfig ¶
type LoadConfig struct { CAPath string CAKeyPath string CertPath string KeyPath string CertConfig *CertConfig }
func (*LoadConfig) SetDefaults ¶
func (c *LoadConfig) SetDefaults() (config *LoadConfig, err error)
Click to show internal directories.
Click to hide internal directories.