Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = &Config{ RenewBefore: 30 * 24, CheckInterval: 7 * 24 * time.Hour, DirectoryURL: "https://acme-v02.api.letsencrypt.org/directory", CacheDirPerm: 0700, }
Default contains a default configuration
Functions ¶
func GenerateCert ¶
GenerateCert do all the job to obtain a new certicate from letsencrypt
func MaybeRenew ¶
func WritePemFile ¶
Types ¶
type CR ¶
type CR struct { Domain string `json:"domain"` Domains []string `json:domains` CertURL string `json:"certUrl"` CertStableURL string `json:"certStableUrl"` PrivateKey []byte `json:"privateKey"` Certificate []byte `json:"certificate"` IssuerCertificate []byte `json:"issuerCertificate"` CSR []byte `json:"csr"` }
CR represents an Lego Certificate Resource
type Config ¶
type Config struct { // renew the certificate X hours before it expires // LetsEncrypt Certs are valid for 90 Days RenewBefore int // Interval for checking if cert is closer to expiration than RenewBefore CheckInterval time.Duration // ACME Directory URL DirectoryURL string // UNIX Permission for the CacheDir and all files inside CacheDirPerm os.FileMode // Path of the CacheDir CacheDir string }
Config allows configuration of simplecert
type SSLUser ¶
type SSLUser struct { Email string Registration *registration.Resource Key *rsa.PrivateKey }
SSLUser implements the ACME User interface
func (SSLUser) GetPrivateKey ¶
func (u SSLUser) GetPrivateKey() crypto.PrivateKey
func (SSLUser) GetRegistration ¶
func (u SSLUser) GetRegistration() *registration.Resource
Click to show internal directories.
Click to hide internal directories.