tls

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCert        = errors.New("no certificate found")
	ErrInvalidCert   = errors.New("certificate invalid")
	ErrFailedWatcher = errors.New("failed to create file watcher")
)

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	NotAfter  time.Time
	NotBefore time.Time

	TLSConfig *tls.Config
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(certFile, keyFile string) (watcher *Watcher, err error)

func (*Watcher) GetCertificateFactory

func (w *Watcher) GetCertificateFactory() func(*tls.ClientHelloInfo) (*tls.Certificate, error)

func (*Watcher) Load

func (w *Watcher) Load() error

func (*Watcher) Start

func (w *Watcher) Start() error

func (*Watcher) Stop

func (w *Watcher) Stop() error

Jump to

Keyboard shortcuts

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