Documentation ¶
Index ¶
- func EncodePem(key *ecdsa.PrivateKey, certs [][]byte) ([]byte, error)
- func FlattenStringSlice(stringSlice []string) string
- func LoadCertFromPEMFile(filename string, skip int) (*x509.Certificate, error)
- func LoadKeyFromPEMFile(filename string, skip int) (*ecdsa.PrivateKey, error)
- func SaveToPEMFile(filename string, key *ecdsa.PrivateKey, certs [][]byte) error
- func WriteCertToFile(certs [][]byte, key *ecdsa.PrivateKey, certFile, keyFile string, ...) error
- type CertificateConfiguration
- type Config
- type DeployHookConfiguration
- type FilesConfiguration
- type HaProxyConfiguration
- type NginxConfiguration
- type TimingConfiguration
- type UpdateResultData
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 ¶
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 ¶
type Config struct { Timing TimingConfiguration Certificate CertificateConfiguration Files FilesConfiguration HaProxy HaProxyConfiguration Nginx NginxConfiguration DeployHook DeployHookConfiguration }
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