package mitm
import "github.com/google/martian/mitm"
Package mitm provides tooling for MITMing TLS connections. It provides tooling to create CA certs and generate TLS configs that can be used to MITM a TLS connection with a provided CA certificate.
Index ¶
- Variables
- func NewAuthority(name, organization string, validity time.Duration) (*x509.Certificate, *rsa.PrivateKey, error)
- type Config
Variables ¶
MaxSerialNumber is the upper boundary that is used to create unique serial numbers for the certificate. This can be any unsigned integer up to 20 bytes (2^(8*20)-1).
Functions ¶
func NewAuthority ¶
func NewAuthority(name, organization string, validity time.Duration) (*x509.Certificate, *rsa.PrivateKey, error)
NewAuthority creates a new CA certificate and associated private key.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a set of configuration values that are used to build TLS configs capable of MITM.
func NewConfig ¶
func NewConfig(ca *x509.Certificate, privateKey interface{}) (*Config, error)
NewConfig creates a MITM config using the CA certificate and private key to generate on-the-fly certificates.
func (*Config) SetOrganization ¶
SetOrganization sets the organization of the certificate.
func (*Config) SetValidity ¶
SetValidity sets the validity window around the current time that the certificate is valid for.
func (*Config) TLS ¶
TLS returns a *tls.Config that will generate certificates on-the-fly using the SNI extension in the TLS ClientHello.
func (*Config) TLSForHost ¶
TLSForHost returns a *tls.Config that will generate certificates on-the-fly using SNI from the connection, or fall back to the provided hostname.
Source Files ¶
- Version
- v2.0.0-beta+incompatible
- Published
- Aug 14, 2015
- Platform
- js/wasm
- Imports
- 13 packages
- Last checked
- 12 minutes ago –
Tools for package owners.