tls

package
v0.0.0-...-61eb987 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(cfg *Config) (*tls.Config, error)

Types

type Config

type Config struct {
	// Enabled determines if TLS should be used. Defaults to false.
	Enabled bool
	// File path to the CA PEM certificate or PEM certificate to be used for TLS
	// connection. If TLS is enabled and no CA cert file is provided, the system
	// certificate pool is used as default.
	CaCertFile string
	CaCertPEM  string
	// File path to the client PEM certificate or client PEM certificate
	ClientCertFile string
	ClientCertPEM  string
	// File path to the client PEM key or client PEM key content
	ClientKeyFile string
	ClientKeyPEM  string
}

func (*Config) IsClientCertProvided

func (c *Config) IsClientCertProvided() bool

Jump to

Keyboard shortcuts

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