tls

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tls provides helpers around the crypto/tls package. Configuration is done via protobuf messages.

Index

Constants

View Source
const (
	// TLSMinVersion is the minimum SSL/TLS version supported.
	TLSMinVersion = tls.VersionTLS12
)

Variables

View Source
var (
	// ErrBadClientAuthType is returned if the corresponding ClientAuthType could not be found.
	ErrBadClientAuthType = errors.New("bad ClientAuthType")
)

Functions

func CertConfig added in v1.1.0

func CertConfig(cfg *pb.TlsConfig) (*tls.Config, error)

CertConfig creates a *tls.Config directive from a proto message, loading an X.509 certificate from the cert/key files specified.

func ClientAuthType

func ClientAuthType(t pb.TlsConfig_ClientAuthType) (tls.ClientAuthType, error)

ClientAuthType converts a proto ClientAuthType to its tls package equivalent.

func Config

func Config(cfg *pb.TlsConfig) (*tls.Config, error)

Config creates a *tls.Config directive from a proto message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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