acme

package
v1.7.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: MIT Imports: 37 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// OSCPMustStaple enables OSCP stapling as from https://github.com/xenolf/lego/issues/270
	OSCPMustStaple = false
)

Functions

func ConvertToNewFormat added in v1.6.0

func ConvertToNewFormat(fileName string)

ConvertToNewFormat converts old acme.json format to the new one and store the result into the file (used for the backward compatibility)

Types

type ACME

type ACME struct {
	Email       string         `description:"Email address used for registration"`
	Domains     []types.Domain `` /* 162-byte string literal not displayed */
	Storage     string         `description:"File or key used for certificates storage."`
	StorageFile string         // Deprecated
	OnDemand    bool           `` // Deprecated
	/* 202-byte string literal not displayed */
	OnHostRule           bool                        `description:"Enable certificate generation on frontends Host rules."`
	CAServer             string                      `description:"CA server to use."`
	EntryPoint           string                      `description:"Entrypoint to proxy acme challenge to."`
	KeyType              string                      `` /* 150-byte string literal not displayed */
	DNSChallenge         *acmeprovider.DNSChallenge  `description:"Activate DNS-01 Challenge"`
	HTTPChallenge        *acmeprovider.HTTPChallenge `description:"Activate HTTP-01 Challenge"`
	TLSChallenge         *acmeprovider.TLSChallenge  `description:"Activate TLS-ALPN-01 Challenge"`
	DNSProvider          string                      `description:"(Deprecated) Activate DNS-01 Challenge"`                                                                    // Deprecated
	DelayDontCheckDNS    flaeg.Duration              `description:"(Deprecated) Assume DNS propagates after a delay in seconds rather than finding and querying nameservers."` // Deprecated
	ACMELogging          bool                        `description:"Enable debug logging of ACME actions."`
	OverrideCertificates bool                        `description:"Enable to override certificates in key-value store when using storeconfig"`

	TLSConfig *tls.Config `description:"TLS config in case wildcard certs are used"`
	// contains filtered or unexported fields
}

ACME allows to connect to lets encrypt and retrieve certs Deprecated Please use provider/acme/Provider

func (*ACME) AddRoutes added in v1.5.0

func (a *ACME) AddRoutes(router *mux.Router)

AddRoutes add routes on internal router

func (*ACME) CreateClusterConfig added in v1.1.0

func (a *ACME) CreateClusterConfig(leadership *cluster.Leadership, tlsConfig *tls.Config, certs *safe.Safe, checkOnDemandDomain func(domain string) bool) error

CreateClusterConfig creates a tls.config using ACME configuration in cluster mode

func (*ACME) LoadCertificateForDomains added in v1.1.0

func (a *ACME) LoadCertificateForDomains(domains []string)

LoadCertificateForDomains loads certificates from ACME for given domains

type Account

type Account struct {
	Email              string
	Registration       *acme.RegistrationResource
	PrivateKey         []byte
	KeyType            acme.KeyType
	DomainsCertificate DomainsCertificates
	ChallengeCerts     map[string]*ChallengeCert
	HTTPChallenge      map[string]map[string][]byte
}

Account is used to store lets encrypt registration info

func FromNewToOldFormat added in v1.6.0

func FromNewToOldFormat(fileName string) (*Account, error)

FromNewToOldFormat converts new acme account to the old one (used for the backward compatibility)

func NewAccount added in v1.1.0

func NewAccount(email string, certs []*DomainsCertificate, keyTypeValue string) (*Account, error)

NewAccount creates an account

func (*Account) GetEmail

func (a *Account) GetEmail() string

GetEmail returns email

func (*Account) GetPrivateKey

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

GetPrivateKey returns private key

func (*Account) GetRegistration

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

GetRegistration returns lets encrypt registration resource

func (*Account) Init added in v1.1.0

func (a *Account) Init() error

Init account struct

func (*Account) RemoveAccountV1Values added in v1.6.3

func (a *Account) RemoveAccountV1Values() error

RemoveAccountV1Values removes ACME account V1 values

type Certificate

type Certificate struct {
	Domain        string
	CertURL       string
	CertStableURL string
	PrivateKey    []byte
	Certificate   []byte
}

Certificate is used to store certificate info

type ChallengeCert added in v1.1.0

type ChallengeCert struct {
	Certificate []byte
	PrivateKey  []byte
	// contains filtered or unexported fields
}

ChallengeCert stores a challenge certificate

type DomainsCertificate

type DomainsCertificate struct {
	Domains     types.Domain
	Certificate *Certificate
	// contains filtered or unexported fields
}

DomainsCertificate contains a certificate for multiple domains

type DomainsCertificates

type DomainsCertificates struct {
	Certs []*DomainsCertificate
	// contains filtered or unexported fields
}

DomainsCertificates stores a certificate for multiple domains

func (*DomainsCertificates) Init added in v1.1.0

func (dc *DomainsCertificates) Init() error

Init DomainsCertificates

func (*DomainsCertificates) Len added in v1.1.2

func (dc *DomainsCertificates) Len() int

func (*DomainsCertificates) Less added in v1.1.2

func (dc *DomainsCertificates) Less(i, j int) bool

func (*DomainsCertificates) Swap added in v1.1.2

func (dc *DomainsCertificates) Swap(i, j int)

type LocalStore added in v1.1.0

type LocalStore struct {
	// contains filtered or unexported fields
}

LocalStore is a store using a file as storage

func NewLocalStore added in v1.1.0

func NewLocalStore(file string) *LocalStore

NewLocalStore create a LocalStore

func (*LocalStore) Get added in v1.1.0

func (s *LocalStore) Get() (*Account, error)

Get loads file into store and returns the Account

Jump to

Keyboard shortcuts

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