tlsutil

package
v0.64.5 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTLSConfig

func NewTLSConfig() *tls.Config

Types

type TLSConfig

type TLSConfig struct {
	Config *tls.Config
}

func NewTLSConfigCerts added in v0.64.1

func NewTLSConfigCerts(certFilepath, keyFilepath string, rootCACertFilepaths, clientCACertFilepaths []string, requireAndVerifyClientCert bool) (*TLSConfig, error)

func (*TLSConfig) LoadClientCACert added in v0.63.0

func (tc *TLSConfig) LoadClientCACert(caCertFilepath string) error

func (*TLSConfig) LoadRootCACert added in v0.63.0

func (tc *TLSConfig) LoadRootCACert(caCertFilepath string) error

func (*TLSConfig) LoadX509KeyPair

func (tc *TLSConfig) LoadX509KeyPair(certFilepath, keyFilepath string) error

type TLSVersion added in v0.64.1

type TLSVersion uint16
const (
	VersionTLS13 TLSVersion = tls.VersionTLS13
	VersionTLS12 TLSVersion = tls.VersionTLS12
	VersionTLS11 TLSVersion = tls.VersionTLS11
	VersionTLS10 TLSVersion = tls.VersionTLS10
	VersionSSL30 TLSVersion = tls.VersionSSL30
)

func (TLSVersion) String added in v0.64.1

func (t TLSVersion) String() string

Jump to

Keyboard shortcuts

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