tls

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewListener    = tls.NewListener
	Dial           = tls.Dial
	DialWithDialer = tls.DialWithDialer
)

Functions

This section is empty.

Types

type ClientConf

type ClientConf struct {
	// Path to file containing certificate.
	Cert string `mapstructure:"cert"`
	// Path to file containing key.
	Key string `mapstructure:"key"`
	// Path to file containing CA for server validation.
	CA string `mapstructure:"ca"`
	// Do not verify server.
	SkipVerify bool `mapstructure:"insecure-no-verify"`
}

func (ClientConf) TLSConfig

func (c ClientConf) TLSConfig() (*tls.Config, error)

type Config

type Config = tls.Config

type Conn

type Conn = tls.Conn

type ServerConf

type ServerConf struct {
	// Path to file containing certificate.
	Cert string `mapstructure:"cert"`
	// Path to file containing key.
	Key string `mapstructure:"key"`
	// Path to file containing CA for client validation.
	CA string `mapstructure:"ca"`
	// Do not verify clients.
	SkipVerify bool `mapstructure:"insecure-no-verify"`
}

func (ServerConf) TLSConfig

func (c ServerConf) TLSConfig() (*tls.Config, error)

Jump to

Keyboard shortcuts

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