Skip to content

Commit

Permalink
martian/mitm: enable getting CA cert from Config
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatczuk committed Sep 27, 2023
1 parent 5c3679b commit d6ea3fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/martian/mitm/mitm.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ func (c *Config) HandshakeErrorCallback(r *http.Request, err error) {
}
}

// CACert returns the CA certificate used to sign the on-the-fly certificates.
func (c *Config) CACert() *x509.Certificate {
return c.ca
}

// TLS returns a *tls.Config that will generate certificates on-the-fly using
// the SNI extension in the TLS ClientHello.
func (c *Config) TLS() *tls.Config {
Expand Down

0 comments on commit d6ea3fc

Please sign in to comment.