acme string

This commit is contained in:
Asim Aslam
2020-10-18 09:47:05 +01:00
parent 68402dcb96
commit 48de9f25a8
2 changed files with 6 additions and 0 deletions

View File

@@ -25,4 +25,6 @@ type Provider interface {
Listen(...string) (net.Listener, error)
// TLSConfig returns a tls config
TLSConfig(...string) (*tls.Config, error)
// Implementation of the acme provider
String() string
}

View File

@@ -40,6 +40,10 @@ func (a *autocertProvider) TLSConfig(hosts ...string) (*tls.Config, error) {
return m.TLSConfig(), nil
}
func (a *autocertProvider) String() string {
return "autocert"
}
// New returns an autocert acme.Provider
func NewProvider() acme.Provider {
return &autocertProvider{}