tls

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTLSCertExpiresSoon = fmt.Errorf("TLS certificate will expire soon")

Functions

func NewTLSTemplate

func NewTLSTemplate() (*x509.Certificate, error)

NewTLSTemplate creates a new TLS template certificate with a random serial number.

Types

type TLS

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

func New

func New(settingsPath string) *TLS

func (*TLS) GenerateCerts

func (t *TLS) GenerateCerts(template *x509.Certificate) error

GenerateCerts generates certs from the given template.

func (*TLS) GetConfig

func (t *TLS) GetConfig() (*tls.Config, error)

GetConfig tries to load TLS config or generate new one which is then returned.

func (*TLS) HasCerts

func (t *TLS) HasCerts() bool

HasCerts returns whether TLS certs have been generated.

func (*TLS) InstallCerts

func (t *TLS) InstallCerts() error

func (*TLS) UninstallCerts

func (t *TLS) UninstallCerts() error

Jump to

Keyboard shortcuts

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