acme

package
v0.0.0-...-8291241 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACME_CHALLENGE_URL_PREFIX = "/.well-known/acme-challenge/"
)

Variables

View Source
var ErrCertificateExpired = errors.New("certificate expired")
View Source
var ErrCertificateNotFound = errors.New("certificate not found")

Functions

func BuiltinCerts

func BuiltinCerts() [][]string

func CreateCertificate

func CreateCertificate(rootdomain string, domains []string, lock bool) ([]byte, []byte, error)

func GenerateCert

func GenerateCert(certificate []byte, privateKey []byte) (*tls.Certificate, error)

func GetCertificate

func GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)

func GetChallenge

func GetChallenge(domain, token string) ([]byte, error)

func Init

func Init() error

func LockCert

func LockCert(rootdomain string) (bool, error)

func RetrieveCertificate

func RetrieveCertificate(domain string) (certificate, privateKey []byte, err error)

func ToggleCertificate

func ToggleCertificate(domains []string) error

func UnlockCert

func UnlockCert(rootdomain string) error

Types

type ACMEUser

type ACMEUser struct {
	Email        string                 `json:"email"`
	Registration *registration.Resource `json:"registration"`
	Key          string                 `json:"key"`
	// contains filtered or unexported fields
}

func (*ACMEUser) GetEmail

func (u *ACMEUser) GetEmail() string

func (*ACMEUser) GetPrivateKey

func (u *ACMEUser) GetPrivateKey() crypto.PrivateKey

func (ACMEUser) GetRegistration

func (u ACMEUser) GetRegistration() *registration.Resource

func (*ACMEUser) SaveOnDisk

func (u *ACMEUser) SaveOnDisk() error

type HTTPChallenger

type HTTPChallenger struct {
}

func (*HTTPChallenger) CleanUp

func (c *HTTPChallenger) CleanUp(domain, token, keyAuth string) error

func (*HTTPChallenger) Present

func (c *HTTPChallenger) Present(domain, token, keyAuth string) error

Jump to

Keyboard shortcuts

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