config

package
v0.0.0-...-0b6d2f4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: AGPL-3.0, AGPL-3.0-or-later Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTLSConfig

func CreateTLSConfig(o TLSOptions) (out *tls.Config, err error)

CreateTLSConfig creates TLS configuration out of specific TLS

Types

type TLSOptions

type TLSOptions struct {
	// Cert contains path to PEM encoded public key certificate
	Cert string
	// Key contains Path to private key associated with given certificate.
	Key string
	// Ciphers is a preference list of supported ciphers, empty list means default
	Ciphers []string
	// MinVersion of TLS to be negotiated with the client  ("1.0", "1.1" ...), no value means no minimum.
	MinVersion string
	// MaxVersion of TLS to be negotiated with the client, no value means no maximum.
	MaxVersion string
	// CACerts contains Path to CA certificates
	CACerts string
	// CertOptional controls whether Cert is optional or not
	CertOptional bool
}

TLSOptions specifies several key options that create TLS Configuration

Jump to

Keyboard shortcuts

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