dns01

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPropagationTimeout default propagation timeout
	DefaultPropagationTimeout = 60 * time.Second

	// DefaultPollingInterval default polling interval
	DefaultPollingInterval = 2 * time.Second

	// DefaultTTL default TTL
	DefaultTTL = 120
)

Variables

This section is empty.

Functions

func ClearFqdnCache

func ClearFqdnCache()

ClearFqdnCache clears the cache of fqdn to zone mappings. Primarily used in testing.

func FindZoneByFqdn

func FindZoneByFqdn(fqdn string) (string, error)

FindZoneByFqdn determines the zone apex for the given fqdn by recursing up the domain labels until the nameserver returns a SOA record in the answer section.

func FindZoneByFqdnCustom

func FindZoneByFqdnCustom(fqdn string, nameservers []string) (string, error)

FindZoneByFqdnCustom determines the zone apex for the given fqdn by recursing up the domain labels until the nameserver returns a SOA record in the answer section.

func GetRecord

func GetRecord(domain, keyAuth string) (fqdn string, value string)

GetRecord returns a DNS record which will fulfill the `dns-01` challenge

func ParseNameservers

func ParseNameservers(servers []string) []string

func ToFqdn

func ToFqdn(name string) string

ToFqdn converts the name into a fqdn appending a trailing dot.

func UnFqdn

func UnFqdn(name string) string

UnFqdn converts the fqdn into a name removing the trailing dot.

Types

type Challenge

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

Challenge implements the dns-01 challenge

func NewChallenge

func NewChallenge(core *api.Core, validate ValidateFunc, provider challenge.Provider, opts ...ChallengeOption) *Challenge

func (*Challenge) CleanUp

func (c *Challenge) CleanUp(authz acme.Authorization) error

CleanUp cleans the challenge.

func (*Challenge) PreSolve

func (c *Challenge) PreSolve(authz acme.Authorization) error

PreSolve just submits the txt record to the dns provider. It does not validate record propagation, or do anything at all with the acme server.

func (*Challenge) Sequential

func (c *Challenge) Sequential() (bool, time.Duration)

func (*Challenge) Solve

func (c *Challenge) Solve(authz acme.Authorization) error

type ChallengeOption

type ChallengeOption func(*Challenge) error

func AddDNSTimeout

func AddDNSTimeout(timeout time.Duration) ChallengeOption

func AddPreCheck

func AddPreCheck(preCheck PreCheckFunc) ChallengeOption

func AddRecursiveNameservers

func AddRecursiveNameservers(nameservers []string) ChallengeOption

func CondOption

func CondOption(condition bool, opt ChallengeOption) ChallengeOption

CondOption Conditional challenge option.

func DisableCompletePropagationRequirement

func DisableCompletePropagationRequirement() ChallengeOption

type DNSProviderManual

type DNSProviderManual struct{}

DNSProviderManual is an implementation of the ChallengeProvider interface

func NewDNSProviderManual

func NewDNSProviderManual() (*DNSProviderManual, error)

NewDNSProviderManual returns a DNSProviderManual instance.

func (*DNSProviderManual) CleanUp

func (*DNSProviderManual) CleanUp(domain, token, keyAuth string) error

CleanUp prints instructions for manually removing the TXT record

func (*DNSProviderManual) Present

func (*DNSProviderManual) Present(domain, token, keyAuth string) error

Present prints instructions for manually creating the TXT record

type PreCheckFunc

type PreCheckFunc func(fqdn, value string) (bool, error)

PreCheckFunc checks DNS propagation before notifying ACME that the DNS challenge is ready.

type ValidateFunc

type ValidateFunc func(core *api.Core, domain string, chlng acme.Challenge) error

Jump to

Keyboard shortcuts

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