cert

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 12 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL