tls

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTLSConfig

func LoadTLSConfig(files CertFiles) (*tls.Config, error)

LoadTLSConfig creates TLS configuration for given crtificate files. It assumes X.509 keypair and sets minimum 1.2 minimum TLS version. All fields of CertFiles are optional. If the field is missing, the corresponding certificate will not be loaded.

Types

type CertFiles

type CertFiles struct {
	RootCAs []string // Root certificate authority file paths.
	Cert    string   // X.509 certificate file path.
	Key     string   // X.509 key file path.
}

Jump to

Keyboard shortcuts

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