2019-10-09 18:42:05 +03:00
|
|
|
// Package acme abstracts away various ACME libraries
|
|
|
|
package acme
|
|
|
|
|
|
|
|
import (
|
2020-02-15 18:10:26 +03:00
|
|
|
"crypto/tls"
|
2019-10-09 18:42:05 +03:00
|
|
|
"errors"
|
|
|
|
"net"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2019-10-11 18:25:15 +03:00
|
|
|
// ErrProviderNotImplemented can be returned when attempting to
|
|
|
|
// instantiate an unimplemented provider
|
2019-10-09 18:42:05 +03: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 18:10:26 +03:00
|
|
|
// Listen returns a new listener
|
|
|
|
Listen(...string) (net.Listener, error)
|
|
|
|
// TLSConfig returns a tls config
|
|
|
|
TLSConfig(...string) (*tls.Config, error)
|
2019-10-09 18:42:05 +03:00
|
|
|
}
|
2019-10-11 18:25:15 +03: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"
|
|
|
|
)
|