tlsutil

package
v2.56.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertLoader

type CertLoader struct {
	CertFile string
	KeyFile  string
	// contains filtered or unexported fields
}

CertLoader is a hot-reloading TLS key-pair loader. It caches the parsed key pair and reloads from disk when the cert file's mtime changes.

A CertLoader has callback functions allowing it to be used for client and server connections.

func NewCertLoader

func NewCertLoader(certFile, keyFile string) *CertLoader

func (*CertLoader) GetCertificate

func (l *CertLoader) GetCertificate(_ *tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificate is a tls.Config.GetCertificate callback used when terminating inbound TLS from clients.

func (*CertLoader) GetClientCertificate

func (l *CertLoader) GetClientCertificate(_ *tls.CertificateRequestInfo) (*tls.Certificate, error)

GetClientCertificate is a tls.Config.GetClientCertificate callback used when communciating with the temporal frontend.

Jump to

Keyboard shortcuts

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