tls

package
v0.42.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowedTLSVersions = []string{"1.0", "1.1", "1.2", "1.3"}

AllowedTLSVersions is for global lists the TLS versions allowed to be used.

Functions

func GetTlsVersion added in v0.42.0

func GetTlsVersion(tlsMinVersion string) (uint16, error)

func NewClientConfig

func NewClientConfig(logger log.Logger, cert, key, caCert, serverName string, skipVerify bool, minTLSVersion string) (*tls.Config, error)

NewClientConfig provides new client TLS configuration. minTLSVersion must be one of 1.0, 1.1, 1.2, 1.3 per GetTlsVersion().

func NewServerConfig

func NewServerConfig(logger log.Logger, certPath, keyPath, clientCA, tlsMinVersion string, ciphers []string, curves []string) (*tls.Config, error)

NewServerConfig provides new server TLS configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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