tls

package
v1.1.0-beta2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tls handles options for TLS (https) requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertSwapper

type CertSwapper struct {
	*sync.Mutex
	Certificates []tls.Certificate
}

CertSwapper is used by a TLSConfig to dynamically update the running Listener's Certificate list This allows Trickster to load and unload TLS certificate configs without restarting the process

func NewSwapper

func NewSwapper(certList []tls.Certificate) *CertSwapper

NewSwapper returns a new *CertSwapper based on the provided certList

func (*CertSwapper) GetCert

func (c *CertSwapper) GetCert(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error)

GetCert returns the best-matching certificate for the provided clientHello

func (*CertSwapper) SetCerts

func (c *CertSwapper) SetCerts(certs []tls.Certificate)

SetCerts safely updates the certs list for the subject *CertSwapper

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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