tls

package
v0.0.0-...-fab57c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package tls provides a mockable wrapper for crypto/tls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) CipherSuiteName

func (*Impl) CipherSuiteName(id uint16) string

func (*Impl) CipherSuites

func (*Impl) CipherSuites() []*tls.CipherSuite

func (*Impl) Client

func (*Impl) Client(conn net.Conn, config *tls.Config) *tls.Conn

func (*Impl) Dial

func (*Impl) Dial(network string, addr string, config *tls.Config) (*tls.Conn, error)

func (*Impl) DialWithDialer

func (*Impl) DialWithDialer(dialer *net.Dialer, network string, addr string, config *tls.Config) (*tls.Conn, error)

func (*Impl) InsecureCipherSuites

func (*Impl) InsecureCipherSuites() []*tls.CipherSuite

func (*Impl) Listen

func (*Impl) Listen(network string, laddr string, config *tls.Config) (net.Listener, error)

func (*Impl) LoadX509KeyPair

func (*Impl) LoadX509KeyPair(certFile string, keyFile string) (tls.Certificate, error)

func (*Impl) NewLRUClientSessionCache

func (*Impl) NewLRUClientSessionCache(capacity int) tls.ClientSessionCache

func (*Impl) NewListener

func (*Impl) NewListener(inner net.Listener, config *tls.Config) net.Listener

func (*Impl) Server

func (*Impl) Server(conn net.Conn, config *tls.Config) *tls.Conn

func (*Impl) X509KeyPair

func (*Impl) X509KeyPair(certPEMBlock []byte, keyPEMBlock []byte) (tls.Certificate, error)

type Interface

type Interface interface {
	CipherSuiteName(id uint16) string
	CipherSuites() []*tls.CipherSuite
	Client(conn net.Conn, config *tls.Config) *tls.Conn
	Dial(network string, addr string, config *tls.Config) (*tls.Conn, error)
	DialWithDialer(dialer *net.Dialer, network string, addr string, config *tls.Config) (*tls.Conn, error)
	InsecureCipherSuites() []*tls.CipherSuite
	Listen(network string, laddr string, config *tls.Config) (net.Listener, error)
	LoadX509KeyPair(certFile string, keyFile string) (tls.Certificate, error)
	NewLRUClientSessionCache(capacity int) tls.ClientSessionCache
	NewListener(inner net.Listener, config *tls.Config) net.Listener
	Server(conn net.Conn, config *tls.Config) *tls.Conn
	X509KeyPair(certPEMBlock []byte, keyPEMBlock []byte) (tls.Certificate, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL