acmeapi: Index | Files

package acmeendpoints

import ""

Package acmeendpoints provides information on known ACME servers.


Package Files

endpoint.go endpoints.go url.go


var (
    // Let's Encrypt (Live v2)
    LetsEncryptLiveV2 = Endpoint{
        Code:                         "LetsEncryptLiveV2",
        Title:                        "Let's Encrypt (Live v2)",
        DirectoryURL:                 "",
        OCSPURLRegexp:                `^http://ocsp\.int-[^.]+\.letsencrypt\.org\.?/.*$`,
        DeprecatedDirectoryURLRegexp: `^https://acme-v01\.api\.letsencrypt\.org/directory$`,
        Live: true,

    // Let's Encrypt (Staging v2)
    LetsEncryptStagingV2 = Endpoint{
        Code:          "LetsEncryptStagingV2",
        Title:         "Let's Encrypt (Staging v2)",
        DirectoryURL:  "",
        OCSPURLRegexp: `^http://ocsp\.(staging|stg-int)-[^.]+\.letsencrypt\.org\.?/.*$`,
        Live:          false,
var DefaultEndpoint = &LetsEncryptLiveV2

Suggested default endpoint.

var ErrNotFound = errors.New("no corresponding endpoint found")

Returned when no matching endpoint can be found.

var Log = xlog.New("acme.endpoints")

func RegisterEndpoint Uses

func RegisterEndpoint(p *Endpoint)

Register a new endpoint.

func Visit Uses

func Visit(f func(p *Endpoint) error) error

Visit all registered endpoints.

type Endpoint Uses

type Endpoint struct {
    // Friendly name for the provider. Should be a short, single-line, title case
    // human readable description of the endpoint.
    Title string

    // Short unique endpoint identifier. Must match ^[a-zA-Z][a-zA-Z0-9_]*$ and
    // should use CamelCase.
    Code string

    // The ACME directory URL. Must be an HTTPS URL and typically ends in
    // "/directory".
    DirectoryURL string

    // If this is not "", this is a regexp which must be matched iff an OCSP
    // endpoint URL as found in a certificate implies that a certificate was
    // issued by this endpoint.
    OCSPURLRegexp string

    // Whether the endpoint gives live certificates.
    Live bool

    // If not "", this is a regexp matching deprecated directory URLs which this
    // endpoint supercedes. We use this to upgrade seamlessly to ACMEv2 without
    // requiring server administrators to change their ACME directory URLs.
    DeprecatedDirectoryURLRegexp string
    // contains filtered or unexported fields

Provides information on a known ACME endpoint.

func ByDirectoryURL Uses

func ByDirectoryURL(directoryURL string) (*Endpoint, error)

Finds an endpoint with the given directory URL. If no such endpoint is found, returns ErrNotFound.

func CreateByDirectoryURL Uses

func CreateByDirectoryURL(directoryURL string) (*Endpoint, error)

If an endpoint exists with the given directory URL, returns it.

Otherwise, tries to create a new endpoint for the directory URL. Where possible, endpoint parameters are guessed. Currently boulder is supported. Non-boulder based endpoints will not have any parameters set other than the directory URL, which means some operations on the endpoint will not succeed.

It is acceptable to change the fields of the returned endpoint. By default, the title of the endpoint is the directory URL.

func (*Endpoint) String Uses

func (e *Endpoint) String() string

Package acmeendpoints imports 6 packages (graph). Updated 2018-08-15. Refresh now. Tools for package owners.