acme

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAccount     = fmt.Errorf("no account found associated with CertManager")
	ErrAccountExists = fmt.Errorf("already have account associated with CertManager")
	ErrNoPKey        = fmt.Errorf("no private key associated with CertManager")
	ErrPKeyExists    = fmt.Errorf("already have private key associated with CertManager")
	ErrNoCert        = fmt.Errorf("no cert was generated")
)

Functions

This section is empty.

Types

type AccountFile

type AccountFile struct {
	PrivateKey string
	URL        string
}

type Bundle

type Bundle struct {
	PrivateKey string
	Chain      []string
}

type CertManager

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

func New

func New(conf Config) (*CertManager, error)

func (*CertManager) CreateAccount

func (c *CertManager) CreateAccount() error

func (*CertManager) ExportAccount

func (c *CertManager) ExportAccount() (*AccountFile, error)

func (*CertManager) ExportBundle

func (c *CertManager) ExportBundle() (*Bundle, error)

func (*CertManager) ExportPrivateKey

func (c *CertManager) ExportPrivateKey() ([]byte, error)

func (*CertManager) GetCertificatesFunc

func (c *CertManager) GetCertificatesFunc(chi *tls.ClientHelloInfo) (*tls.Certificate, error)

func (*CertManager) ImportAccount

func (c *CertManager) ImportAccount(af AccountFile, persist bool) error

func (*CertManager) ImportBundle

func (c *CertManager) ImportBundle(bundle Bundle, persist bool) error

func (*CertManager) ImportPrivateKey

func (c *CertManager) ImportPrivateKey(keyPem string) error

func (*CertManager) LoadAccountFromFile

func (c *CertManager) LoadAccountFromFile() error

func (*CertManager) LoadBundleFromFile

func (c *CertManager) LoadBundleFromFile() error

func (*CertManager) RequestCertificate

func (c *CertManager) RequestCertificate() error

type Config

type Config struct {
	Directory   string
	DNSProvider Provider
	Contact     string
	DataDir     string
	RootZone    string
	Domain      string
}

type Provider

type Provider interface {
	Update(c context.Context, host string, t string, value string) (success bool, err error)
	Remove(c context.Context, host string, t string, value string) (success bool, err error)
}

Jump to

Keyboard shortcuts

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