common

package
v0.0.0-...-58e9167 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePem

func EncodePem(key *ecdsa.PrivateKey, certs [][]byte) ([]byte, error)

EncodePem encodes certificates and key in PEM format

func FlattenStringSlice

func FlattenStringSlice(stringSlice []string) string

FlattenStringSlice joins strings from a slice with commas for printing

func LoadCertFromPEMFile

func LoadCertFromPEMFile(filename string, skip int) (*x509.Certificate, error)

LoadCertFromPEMFile parses a certificate from a pem file. Skip specifies how many certificates are skipped before the next one is parsed and returned.

func LoadKeyFromPEMFile

func LoadKeyFromPEMFile(filename string, skip int) (*ecdsa.PrivateKey, error)

LoadKeyFromPEMFile parses a key from a pem file. Skip specifies how many keys are skipped before the next one is parsed and returned.

func SaveToPEMFile

func SaveToPEMFile(filename string, key *ecdsa.PrivateKey, certs [][]byte) error

SaveToPEMFile saves certiceates and key pem encoded to a file

func WriteCertToFile

func WriteCertToFile(certs [][]byte, key *ecdsa.PrivateKey, certFile, keyFile string, singleFile bool) error

WriteCertToFile writes Certificates and Key to PEM Files When singleFile is true, cert and key are bothes stored in certFile, otherwise they are stored in two separate files

Types

type CertificateConfiguration

type CertificateConfiguration struct {
	DNSNames        []string
	MustStaple      bool
	AcmeDirectory   string
	AcmeAccountFile string
	RegisterAcme    bool
}

CertificateConfiguration stores Certificate content ACME account data

type Config

Config is the struct holding all configuration for a certificate. The config file is parsed into this struct.

type DeployHookConfiguration

type DeployHookConfiguration struct {
	Executable string // Leave empyty to disable deploy hook execution
}

DeployHookConfiguration stores whether and which deployhook is run by certbutler

type FilesConfiguration

type FilesConfiguration struct {
	SingleFile bool   // store cert and key CertFile (for e.g. haproxy)
	CertFile   string // store cert and key in two files (for e.g. nginx)
	KeyFile    string // store cert and key in two files (for e.g. nginx)
}

FilesConfiguration stores how received content to files

type HaProxyConfiguration

type HaProxyConfiguration struct {
	HAProxySocket string // leave empty to disable haproxy interaction
}

HaProxyConfiguration stores whether and how certbutler interacts with haproxy

type NginxConfiguration

type NginxConfiguration struct {
	ReloadNginx bool // set false und leave unset to disable nginx reload
}

NginxConfiguration stores whether and how certbutler interacts with nginx

type TimingConfiguration

type TimingConfiguration struct {
	RunIntervalMinutes int
	RenewalDueCert     int // remaining valid days of the certitifcate before renew; set to 0 to disable Certificate refresh
	RenewalDueOCSP     int // remaining valid days of the OCSP response before renew; set to 0 to disable OCSP refresh
}

TimingConfiguration stores the values defining scheduling and due dates

type UpdateResultData

type UpdateResultData struct {
	Certificates [][]byte
	Key          *ecdsa.PrivateKey
	OCSPResponse []byte
}

UpdateResultData holds the received results for usage of post-processors

Jump to

Keyboard shortcuts

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