certfetcher

package
v0.0.0-...-57974ef Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DNSProvider

func DNSProvider(name string) (challenge.Provider, error)

func NewLegoClient

func NewLegoClient(config *lego.Config, httpChallengePort int,
	httpChallengeWebRoot string, tlsChallengePort int,
	dnsProvider string) (*lego.Client, error)

NewLegoClient returns a new Lego ACME Client given the configuration parameters passed in.

Types

type AcmeUser

type AcmeUser struct {
	Email        string
	Registration *registration.Resource
	// contains filtered or unexported fields
}

Implements registration.User

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

type CertFetcher

type CertFetcher struct {
	AcmeDiscoveryURL string
	AcmeUser         AcmeUser

	CertSignRequest *x509.CertificateRequest
	// contains filtered or unexported fields
}

func New

func New(email string, eabKid string, eabHmac string, certSignRequest *x509.CertificateRequest,
	privateKey crypto.PrivateKey, acmeDiscoURL string, httpChallengePort int, httpChallengeWebRoot string,
	tlsChallengePort int, dnsProvider string, shouldRegister bool) (*CertFetcher, error)

Initializes the cert fetcher with information it needs to fetch new certificates in the future. TODO(banaag): per gregable@ comments: Callsite could have some structure like:

fetcher := CertFetcher() fetcher.setUser(email, privateKey) fetcher.bindToPort(port)

func (*CertFetcher) FetchNewCert

func (f *CertFetcher) FetchNewCert() ([]*x509.Certificate, error)

Jump to

Keyboard shortcuts

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