Documentation ¶
Overview ¶
Package cert fetches the root certificate for MitM proxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CA ¶
type CA struct { PrivateKey rsa.PrivateKey RootCert x509.Certificate // contains filtered or unexported fields }
func (*CA) GenerateCert ¶
func (ca *CA) GenerateCert(commonName string) (*tls.Certificate, error)
TODO: Should support multiple SubjectAltName.
type Loader ¶
type Loader interface {
Load() (*rsa.PrivateKey, *x509.Certificate, error)
}
type MemoryLoader ¶
type MemoryLoader struct{}
func (*MemoryLoader) Load ¶
func (m *MemoryLoader) Load() (*rsa.PrivateKey, *x509.Certificate, error)
type PathLoader ¶
type PathLoader struct {
StorePath string
}
func NewPathLoader ¶
func NewPathLoader(path string) (*PathLoader, error)
func (*PathLoader) Load ¶
func (p *PathLoader) Load() (*rsa.PrivateKey, *x509.Certificate, error)
Click to show internal directories.
Click to hide internal directories.