certloader

package
v0.0.0-...-57974ef Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertFetcher

func CreateCertFetcher(config *util.Config, key crypto.PrivateKey, domain string,
	developmentMode bool, autoRenewCert bool) (*certfetcher.CertFetcher, error)

func LoadAndValidateCertsFromFile

func LoadAndValidateCertsFromFile(certPath string, requireSign bool) ([]*x509.Certificate, error)

func LoadCSRFromFile

func LoadCSRFromFile(config *util.Config) (*x509.CertificateRequest, error)

func LoadCertsFromFile

func LoadCertsFromFile(config *util.Config, developmentMode bool) ([]*x509.Certificate, error)

Loads X509 certificates from disk. Returns appropriate errors if:

The file can't be read.
The certificate can't be parsed.
No certificates found in the file.
Certificates cannot be used to sign HTTP exchanges.
 (if developmentMode, print a warning that certs can't
 be used to sign HTTP exchanges).

If there are no errors, the array of certificates is returned.

func LoadKeyFromFile

func LoadKeyFromFile(config *util.Config) (crypto.PrivateKey, error)

Loads private key from file. Returns appropriate errors if:

The file can't be read.
The key can't be parsed.

If there are no errors, the key is returned.

func RemoveFile

func RemoveFile(filepath string) error

func WriteCertsToFile

func WriteCertsToFile(certs []*x509.Certificate, filepath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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