v0.0.0-...-dd72184 Latest Latest

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 22 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type ACME

type ACME struct {
	// contains filtered or unexported fields

The ACME object implements the ACME protocol machinery, and can be used to create and renew certificates. It also serves as an HTTP handler to satisfy http-01 validation requests.

func NewACME

func NewACME(email, directoryURL string, keystore keyBackend, tokens tokenBackend) *ACME

func (*ACME) ServeHTTP

func (a *ACME) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Cert

type Cert struct {
	Priv []byte
	Pub  [][]byte

func (*Cert) Names

func (c *Cert) Names() (names []string)

func (*Cert) NotAfter

func (c *Cert) NotAfter() time.Time

func (*Cert) TLSCertificate

func (c *Cert) TLSCertificate() (*tls.Certificate, error)

type Manager

type Manager struct {
	// contains filtered or unexported fields

A Manager is responsible for a single SSL certificate (which may have multiple names). It will store the certificate itself, and the ACME state, on etcd, so that it is replicated to all HTTPS servers.

Renewal is handled via (internal) cron jobs, with random schedules to avoid having to implement leader-election for such a simple task.

func NewManager

func NewManager(ctx context.Context, cli *clientv3.Client, email, directoryURL string, certNames []string) (*Manager, error)

func (*Manager) GetCertificate

func (m *Manager) GetCertificate(_ *tls.ClientHelloInfo) (*tls.Certificate, error)

Jump to

Keyboard shortcuts

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