Versions in this module Expand all Collapse all v0 v0.7.3 Sep 16, 2019 v0.7.2 Sep 16, 2019 Changes in this version + const DefaultOCSPCheckInterval + const DefaultRenewCheckInterval + const DefaultRenewDurationBefore + const DefaultRenewDurationBeforeAtStartup + const HTTPChallengePort + const LetsEncryptProductionCA + const LetsEncryptStagingCA + const TLSALPNChallengePort + var Default = Config + var HTTPPort = 80 + var HTTPSPort = 443 + var HTTPTimeout = 30 * time.Second + var UserAgent string + func CleanStorage(storage Storage, opts CleanStorageOptions) + func CleanUpOwnLocks() + func HTTPS(domainNames []string, mux http.Handler) error + func HostQualifies(hostname string) bool + func Listen(domainNames []string) (net.Listener, error) + func LooksLikeHTTPChallenge(r *http.Request) bool + func Manage(domainNames []string) error + func NormalizedName(serverName string) string + func TLS(domainNames []string) (*tls.Config, error) + type Cache struct + func NewCache(opts CacheOptions) *Cache + func (certCache *Cache) AllMatchingCertificates(name string) []Certificate + func (certCache *Cache) RenewManagedCertificates(interactive bool) error + func (certCache *Cache) Stop() + type CacheOptions struct + GetConfigForCert ConfigGetter + OCSPCheckInterval time.Duration + RenewCheckInterval time.Duration + type CertMetadata struct + PublicKeyAlgorithm x509.PublicKeyAlgorithm + SerialNumber *big.Int + Subject pkix.Name + Tags []string + func (cm CertMetadata) HasTag(tag string) bool + type Certificate struct + Names []string + NotAfter time.Time + func (cert Certificate) NeedsRenewal(cfg *Config) bool + type CertificateSelector interface + SelectCertificate func(*tls.ClientHelloInfo, []Certificate) (Certificate, error) + type CleanStorageOptions struct + OCSPStaples bool + type Config struct + Agreed bool + AltHTTPPort int + AltTLSALPNPort int + CA string + CertObtainTimeout time.Duration + CertSelection CertificateSelector + DNSProvider challenge.Provider + DefaultServerName string + DisableHTTPChallenge bool + DisableHTTPServer bool + DisableTLSALPNChallenge bool + Email string + KeyType certcrypto.KeyType + ListenHost string + MustStaple bool + NewManager func(interactive bool) (Manager, error) + OnDemand *OnDemandConfig + OnEvent func(event string, data interface{}) + RenewDurationBefore time.Duration + RenewDurationBeforeAtStartup time.Duration + Storage Storage + func New(certCache *Cache, cfg Config) *Config + func NewDefault() *Config + func (cfg *Config) CacheManagedCertificate(domain string) (Certificate, error) + func (cfg *Config) CacheUnmanagedCertificatePEMBytes(certBytes, keyBytes []byte, tags []string) error + func (cfg *Config) CacheUnmanagedCertificatePEMFile(certFile, keyFile string, tags []string) error + func (cfg *Config) CacheUnmanagedTLSCertificate(tlsCert tls.Certificate, tags []string) error + func (cfg *Config) GetCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error) + func (cfg *Config) HTTPChallengeHandler(h http.Handler) http.Handler + func (cfg *Config) HandleHTTPChallenge(w http.ResponseWriter, r *http.Request) bool + func (cfg *Config) Manage(domainNames []string) error + func (cfg *Config) ObtainCert(name string, interactive bool) error + func (cfg *Config) RenewCert(name string, interactive bool) error + func (cfg *Config) RevokeCert(domain string, interactive bool) error + func (cfg *Config) TLSConfig() *tls.Config + type ConfigGetter func(Certificate) (Config, error) + type ErrNotExist interface + type FileStorage struct + Path string + func (fs *FileStorage) Delete(key string) error + func (fs *FileStorage) Exists(key string) bool + func (fs *FileStorage) Filename(key string) string + func (fs *FileStorage) List(prefix string, recursive bool) ([]string, error) + func (fs *FileStorage) Load(key string) ([]byte, error) + func (fs *FileStorage) Lock(key string) error + func (fs *FileStorage) Stat(key string) (KeyInfo, error) + func (fs *FileStorage) Store(key string, value []byte) error + func (fs *FileStorage) String() string + func (fs *FileStorage) Unlock(key string) error + type KeyBuilder struct + var StorageKeys KeyBuilder + func (keys KeyBuilder) CAPrefix(ca string) string + func (keys KeyBuilder) OCSPStaple(cert *Certificate, pemBundle []byte) string + func (keys KeyBuilder) Safe(str string) string + func (keys KeyBuilder) SiteCert(ca, domain string) string + func (keys KeyBuilder) SiteMeta(ca, domain string) string + func (keys KeyBuilder) SitePrefix(ca, domain string) string + func (keys KeyBuilder) SitePrivateKey(ca, domain string) string + func (keys KeyBuilder) UserPrefix(ca, email string) string + func (keys KeyBuilder) UserPrivateKey(ca, email string) string + func (keys KeyBuilder) UserReg(ca, email string) string + func (keys KeyBuilder) UsersPrefix(ca string) string + type KeyInfo struct + IsTerminal bool + Key string + Modified time.Time + Size int64 + type Locker interface + Lock func(key string) error + Unlock func(key string) error + type Manager interface + Obtain func(name string) error + Renew func(name string) error + Revoke func(name string) error + type OnDemandConfig struct + DecisionFunc func(name string) error + type Storage interface + Delete func(key string) error + Exists func(key string) bool + List func(prefix string, recursive bool) ([]string, error) + Load func(key string) ([]byte, error) + Stat func(key string) (KeyInfo, error) + Store func(key string, value []byte) error