b07890af4d
Auto-configure every relevant TLS field as close as possible to where it's actually used. As a side effect, add support for mocking the creation of a TLS connection, which should possibly be useful for uTLS? Work that is part of https://github.com/ooni/probe/issues/1505
19 lines
318 B
Go
19 lines
318 B
Go
package netxlite
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"net"
|
|
)
|
|
|
|
// TLSConn is any tls.Conn-like structure.
|
|
type TLSConn interface {
|
|
// net.Conn is the embedded conn.
|
|
net.Conn
|
|
|
|
// ConnectionState returns the TLS connection state.
|
|
ConnectionState() tls.ConnectionState
|
|
|
|
// Handshake performs the handshake.
|
|
Handshake() error
|
|
}
|