tlsconfig

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCertificatesLoading  = errors.New("cert and key could not be loaded")
	ErrCaLoading            = errors.New("ca could not be loaded")
	ErrFailedToAppendCACert = errors.New("failed to append CA certificate to the pool")
)

Functions

func NewTLSConfig

func NewTLSConfig(opts ...Option) (*tls.Config, error)

Types

type Option

type Option func(*tls.Config) error

func WithCA

func WithCA(caPath string) Option

func WithCertAndKey

func WithCertAndKey(certPath, keyPath string) Option

func WithCertPool

func WithCertPool(pool *x509.CertPool) Option

func WithMinVersion

func WithMinVersion(minVersion uint16) Option

Jump to

Keyboard shortcuts

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