tlsconfig

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...Option) (*tls.Config, error)

New returns tls.Config with all options applied.

Types

type Option

type Option func(config *tls.Config) error

Option applies a modification on a tls.Config.

func CA

func CA(path string) Option

CA adds CA certificate from file to tls.Config. If not using this Option, then TLS will be using the host's root CA set.

func CertKey

func CertKey(certPath, keyPath string) Option

CertKey adds certificate with key to tls.Config.

func SkipServerVerification

func SkipServerVerification() Option

SkipServerVerification turns off verification of server's certificate chain and host name.

Jump to

Keyboard shortcuts

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