acme

package
v3.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package acme provides a means of performing Let's Encrypt DNS challenges via a DNSConfig

Index

Constants

View Source
const (
	// LetsEncryptLive is the endpoint for updates (production).
	LetsEncryptLive = "https://acme-v02.api.letsencrypt.org/directory"
	// LetsEncryptStage is the endpoint for the staging area.
	LetsEncryptStage = "https://acme-staging-v02.api.letsencrypt.org/directory"
)

Variables

View Source
var IgnoredProviders = map[string]bool{}

IgnoredProviders is a lit of provider names that should not be used to fill challenges.

Functions

This section is empty.

Types

type Account

type Account struct {
	Email        string                 `json:"email"`
	Registration *registration.Resource `json:"registration"`
	// contains filtered or unexported fields
}

Account stores the data related to an ACME account.

func (*Account) GetEmail

func (a *Account) GetEmail() string

GetEmail is a getter for the Email field.

func (*Account) GetPrivateKey

func (a *Account) GetPrivateKey() crypto.PrivateKey

GetPrivateKey is a getter for the PrivateKey field.

func (*Account) GetRegistration

func (a *Account) GetRegistration() *registration.Resource

GetRegistration is a getter for the registration field.

type CertConfig

type CertConfig struct {
	CertName   string   `json:"cert_name"`
	Names      []string `json:"names"`
	UseECC     bool     `json:"use_ecc"`
	MustStaple bool     `json:"must_staple"`
}

CertConfig describes a certificate's configuration.

type Client

type Client interface {
	IssueOrRenewCert(config *CertConfig, renewUnder int, verbose bool) (bool, error)
}

Client is an interface for systems that issue or renew certs.

func New

func New(cfg *models.DNSConfig, directory string, email string, server string, notify notifications.Notifier) (Client, error)

New is a factory for acme clients.

func NewVault

func NewVault(cfg *models.DNSConfig, vaultPath string, email string, server string, notify notifications.Notifier) (Client, error)

NewVault is a factory for new vaunt clients.

type Storage

type Storage interface {
	// Get Existing certificate, or return nil if it does not exist
	GetCertificate(name string) (*certificate.Resource, error)
	StoreCertificate(name string, cert *certificate.Resource) error

	GetAccount(acmeHost string) (*Account, error)
	StoreAccount(acmeHost string, account *Account) error
}

Storage is an abstracrion around how certificates, keys, and account info are stored on disk or elsewhere.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL