acme

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakePKey

func MakePKey(w io.Writer) (crypto.PrivateKey, error)

MakePKey makes a new ECDSA private key and writes it to the given writer.

func ReadPKey

func ReadPKey(r io.Reader) (crypto.PrivateKey, error)

ReadPKey reads a PEM-encoded private key from the given reader.

func RefreshCerts

func RefreshCerts(info Info) (*certificate.Resource, error)

RefreshCerts attempts to obtain a new certificate for the given domains using the given info.

func WriteResources

func WriteResources(resource *certificate.Resource, wKey, wCert io.Writer) error

WriteResources writes the certificate and private key to the given writers.

Types

type CertMan

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

func NewCertMan

func NewCertMan(info Info, handler func(error)) (*CertMan, error)

func (*CertMan) Refresh

func (cm *CertMan) Refresh() error

func (*CertMan) SetFilepaths

func (cm *CertMan) SetFilepaths(cert, key string)

func (*CertMan) SetRefreshInterval

func (cm *CertMan) SetRefreshInterval(d time.Duration)

SetRefreshInterval can be used to set how much time before expiration for automatic updates to happen. e.g., 30 days before expiration after each refres, the next refresh will be scheduled

func (*CertMan) TimedRefresher

func (cm *CertMan) TimedRefresher(close <-chan struct{})

type Info

type Info struct {
	// Email to use for ACME registration
	AuthEmail string
	// Cloudflare API credentials
	AuthKey    string
	Domains    []string
	PrivateKey crypto.PrivateKey
}

Jump to

Keyboard shortcuts

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