Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authority ¶
type Authority struct {
Cert *x509.Certificate
Key *ecdsa.PrivateKey
TLSCert tls.Certificate
}
Authority holds a CA certificate and private key used to sign leaf certificates.
func GenerateToPath ¶
GenerateToPath creates a new CA and writes it to disk. Returns the Authority.
func LoadOrGenerate ¶
LoadOrGenerate loads an existing CA from disk, or generates a new one if the files don't exist.
type CertCache ¶
type CertCache struct {
// contains filtered or unexported fields
}
CertCache generates and caches TLS leaf certificates signed by a CA.
func NewCertCache ¶
NewCertCache creates a certificate cache backed by the given CA.
func (*CertCache) GetCertificate ¶
func (cc *CertCache) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificate returns a TLS certificate for the given ClientHello. This matches the tls.Config.GetCertificate signature.
Click to show internal directories.
Click to hide internal directories.