2019-10-09 16:42:05 +01:00
|
|
|
// Package acme abstracts away various ACME libraries
|
|
|
|
package acme
|
|
|
|
|
|
|
|
import (
|
2020-02-15 15:10:26 +00:00
|
|
|
"crypto/tls"
|
2019-10-09 16:42:05 +01:00
|
|
|
"errors"
|
|
|
|
"net"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2019-10-11 16:25:15 +01:00
|
|
|
// ErrProviderNotImplemented can be returned when attempting to
|
|
|
|
// instantiate an unimplemented provider
|
2019-10-09 16:42:05 +01:00
|
|
|
ErrProviderNotImplemented = errors.New("Provider not implemented")
|
|
|
|
)
|
|
|
|
|
|
|
|
// Provider is a ACME provider interface
|
|
|
|
type Provider interface {
|
2020-09-05 02:43:16 +03:00
|
|
|
Init(...Option) error
|
2020-02-15 15:10:26 +00:00
|
|
|
// Listen returns a new listener
|
|
|
|
Listen(...string) (net.Listener, error)
|
|
|
|
// TLSConfig returns a tls config
|
|
|
|
TLSConfig(...string) (*tls.Config, error)
|
2019-10-09 16:42:05 +01:00
|
|
|
}
|
2019-10-11 16:25:15 +01:00
|
|
|
|
|
|
|
// The Let's Encrypt ACME endpoints
|
|
|
|
const (
|
|
|
|
LetsEncryptStagingCA = "https://acme-staging-v02.api.letsencrypt.org/directory"
|
|
|
|
LetsEncryptProductionCA = "https://acme-v02.api.letsencrypt.org/directory"
|
|
|
|
)
|