tls

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tls handles options for TLS (https) requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptionsChanged

func OptionsChanged(conf, oldConf *config.Config) bool

OptionsChanged will return true if the TLS options for any origin is different between configs

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