server

package
v2.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertManager

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

CertManager holds certificates from filesystem watched for changes

func New

func New(config Config, fileWatcher *fsnotify.Watcher, logger log.Logger) (*CertManager, error)

New creates a new certificate manager which watches for certs in a filesystem

func (*CertManager) Close

func (c *CertManager) Close()

Close ends watching certificates

func (*CertManager) GetTLSConfig

func (c *CertManager) GetTLSConfig() *tls.Config

GetTLSConfig returns tls configuration for clients

type Config

type Config struct {
	CAPool                    string `yaml:"caPool" json:"caPool" description:"file path to the root certificates in PEM format"`
	KeyFile                   string `yaml:"keyFile" json:"keyFile" description:"file name of private key in PEM format"`
	CertFile                  string `yaml:"certFile" json:"certFile" description:"file name of certificate in PEM format"`
	ClientCertificateRequired bool   `yaml:"clientCertificateRequired" json:"clientCertificateRequired" description:"require client certificate"`
}

Config provides configuration of a file based Server Certificate manager

func (Config) Validate

func (c Config) Validate() error

Jump to

Keyboard shortcuts

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