acme

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: MIT Imports: 21 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  = "https://acme-v02.api.letsencrypt.org/directory"
	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 *acme.RegistrationResource `json:"registration"`
	// contains filtered or unexported fields
}

func (*Account) GetEmail

func (a *Account) GetEmail() string

func (*Account) GetPrivateKey

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

func (*Account) GetRegistration

func (a *Account) GetRegistration() *acme.RegistrationResource

type CertConfig

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

type Client

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

func New

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

func NewVault

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

type Storage

type Storage interface {
	// Get Existing certificate, or return nil if it does not exist
	GetCertificate(name string) (*acme.CertificateResource, error)
	StoreCertificate(name string, cert *acme.CertificateResource) 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