Documentation
¶
Overview ¶
Package ca provides certificate authority management for MITM proxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCADir ¶
func DefaultCADir() string
DefaultCADir returns the default directory for storing CA files.
func DefaultCertPath ¶
func DefaultCertPath() string
DefaultCertPath returns the default path for the CA certificate.
func DefaultKeyPath ¶
func DefaultKeyPath() string
DefaultKeyPath returns the default path for the CA private key.
Types ¶
type CA ¶
type CA struct {
Certificate *x509.Certificate
PrivateKey *ecdsa.PrivateKey
// contains filtered or unexported fields
}
CA represents a certificate authority for MITM proxying.
func LoadFromPEM ¶
LoadFromPEM loads a CA from PEM-encoded data.
func LoadOrCreate ¶
LoadOrCreate loads an existing CA or creates a new one if it doesn't exist.
func (*CA) GenerateCert ¶
GenerateCert generates a certificate for the given domain, signed by this CA.
func (*CA) TLSCertificate ¶
func (ca *CA) TLSCertificate() (tls.Certificate, error)
TLSCertificate returns the CA as a tls.Certificate.
Click to show internal directories.
Click to hide internal directories.