Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIdentificationFailed = errors.New("failed to identify socket type")
)

Functions

func NewCertificate

func NewCertificate(certFile, keyFile, commonName string, lifetimeDays int) (tls.Certificate, error)

NewCertificate generates and returns a new TLS certificate.

func SecureDefault

func SecureDefault() *tls.Config

SecureDefault returns a tls.Config with reasonable, secure defaults set.

Types

type DowngradingListener

type DowngradingListener struct {
	net.Listener
	TLSConfig *tls.Config
}

func (*DowngradingListener) Accept

func (l *DowngradingListener) Accept() (net.Conn, error)

func (*DowngradingListener) AcceptNoWrapTLS

func (l *DowngradingListener) AcceptNoWrapTLS() (net.Conn, bool, error)

type UnionedConnection

type UnionedConnection struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*UnionedConnection) Read

func (c *UnionedConnection) Read(b []byte) (n int, err error)

Source Files