Documentation
¶
Overview ¶
Package tls handles options for TLS (https) requests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptionsChanged ¶
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
Click to show internal directories.
Click to hide internal directories.