Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadRootCA ¶
func LoadRootCA(certPEM, keyPEM []byte) (*x509.Certificate, crypto.PrivateKey, error)
LoadRootCA loads the root CA certificate and private key from PEM files
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles certificate generation and caching
func NewManager ¶
func NewManager(caCert *x509.Certificate, caKey crypto.PrivateKey) (*Manager, error)
NewManager creates a new certificate manager
func (*Manager) GetCertificate ¶
func (m *Manager) GetCertificate(hostname string) (*tls.Certificate, error)
GetCertificate returns a certificate for the given hostname, generating it if necessary
func (*Manager) GetCertificateFunc ¶
func (m *Manager) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificateFunc returns a function suitable for tls.Config.GetCertificate
Click to show internal directories.
Click to hide internal directories.