tls

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientTLSConfig added in v0.3.3

func NewClientTLSConfig(xfs fs.FS, certPath, keyPath, caPath, serverName string) (clientTLSConfig *tls.Config, err error)

NewClientTLSConfig returns a TLS Config for a client connection. `caPath` can be empty, in that case, RootCAs is nil, TLS uses the host's root CA set.

func NewServerTLSConfig added in v0.3.3

func NewServerTLSConfig(xfs fs.FS, certPath, keyPath, caPath string, verifyPeer bool) (serverTLSConfig *tls.Config, err error)

NewServerTLSConfig returns a TLS Config for a server connection. when verifyPeer=true, strictly verify client certs only issued by the designated CA (caPath)

Types

This section is empty.

Jump to

Keyboard shortcuts

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