Documentation ¶
Index ¶
- type Conn
- type TLSLog
- func (l *TLSLog) Client(conn net.Conn, config *tls.Config) *Conn
- func (l *TLSLog) Dial(network, addr string, config *tls.Config) (*tls.Conn, error)
- func (l *TLSLog) DialWithDialer(dialer *net.Dialer, network, addr string, config *tls.Config) (*tls.Conn, error)
- func (l *TLSLog) Listen(network, laddr string, config *tls.Config) (net.Listener, error)
- func (l *TLSLog) Server(conn net.Conn, config *tls.Config) *Conn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is returned by Server/Client, it stores tls.Conn and tls.Config used in Handshark
type TLSLog ¶
type TLSLog struct {
// contains filtered or unexported fields
}
TLSLog is a wrapper of tls. TlsLog can dial to the tls server and log client random and masterSecret to specific file which can be used to decrypt ssl application data in wireshark
func NewTLSLog ¶
NewTLSLog returns a TLSLog with logFile set. logFile is the file path to store client random and masterSecret If logFile is empty, then the environment variable SSLKEYLOGFILE will be used instead
func (*TLSLog) Client ¶
Client use tls.Client to build a tls.Conn and return a TlsLog.Conn for Handshake
func (*TLSLog) Dial ¶
Dial uses tls.Dial to connect to tls server and write master secret and client to log file.
func (*TLSLog) DialWithDialer ¶
func (l *TLSLog) DialWithDialer(dialer *net.Dialer, network, addr string, config *tls.Config) (*tls.Conn, error)
DialWithDialer uses tls.DialWithDialer to connect to tls server and write master secret and client to log file.