certregistry

package
v0.21.177 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertRegistry

type CertRegistry struct {
	// contains filtered or unexported fields
}

CertRegistry object holds TLS certificates to be used to terminate TLS connections ensuring synchronized access to them.

func NewCertRegistry

func NewCertRegistry() *CertRegistry

NewCertRegistry initializes the certificate registry.

func (*CertRegistry) ConfigureCertificate

func (r *CertRegistry) ConfigureCertificate(host string, cert *tls.Certificate) error

Configures certificate for the host if no configuration exists or if certificate is valid (`NotBefore` field) after previously configured certificate.

func (*CertRegistry) GetCertFromHello

func (r *CertRegistry) GetCertFromHello(hello *tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertFromHello reads the SNI from a TLS client and returns the appropriate certificate. If no certificate is found for the host it will return nil.

Jump to

Keyboard shortcuts

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