Documentation
¶
Overview ¶
Package certutil provides utilities for managing self-signed certificates
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTLSCertificate ¶
func LoadTLSCertificate(certPEM, keyPEM []byte) (tls.Certificate, error)
LoadTLSCertificate loads a TLS certificate from PEM files
Types ¶
type CertificateManager ¶
type CertificateManager struct {
// contains filtered or unexported fields
}
CertificateManager manages self-signed certificates for the network
func NewCertificateManager ¶
func NewCertificateManager(baseDir string) *CertificateManager
NewCertificateManager creates a new certificate manager
func (*CertificateManager) EnsureCACertificate ¶
func (cm *CertificateManager) EnsureCACertificate() ([]byte, []byte, error)
EnsureCACertificate creates or loads the CA certificate
func (*CertificateManager) EnsureNodeCertificate ¶
func (cm *CertificateManager) EnsureNodeCertificate(hostname string, caCertPEM, caKeyPEM []byte) ([]byte, []byte, error)
EnsureNodeCertificate creates or loads a node certificate signed by the CA
Click to show internal directories.
Click to hide internal directories.