acme

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Taken from https://github.com/chinzhiweiblank/coredns-acme/blob/e0cdfbdd78adfcc6c2d098255902f64ec60daecb/provider.go Copyright @chinzhiweiblank under Apache License 2.0

Index

Constants

View Source
const (
	DNSChallengeString   = "_acme-challenge."
	CertificateAuthority = "letsencrypt.org."
)

Variables

View Source
var DefaultResolvers = []string{
	"1.1.1.1:53",
	"1.0.0.1:53",
	"8.8.8.8:53",
	"8.8.4.4:53",
}

DefaultResolvers trusted

Functions

func BuildTlsConfigWithCertAndKeyPaths

func BuildTlsConfigWithCertAndKeyPaths(certPath, privKeyPath, domain string) (*tls.Config, error)

BuildTlsConfigWithCertAndKeyPaths Build TlsConfig with certificates

func BuildTlsConfigWithCerts

func BuildTlsConfigWithCerts(domain string, certs ...tls.Certificate) (*tls.Config, error)

BuildTlsConfigWithCerts Build TlsConfig with existing certificates

func CleanupStorage

func CleanupStorage()

CleanupStorage perform cleanup routines tasks

func ExtractCaddyPaths

func ExtractCaddyPaths(cfg *certmagic.Config, issuer certmagic.Issuer, domain string) (certPath, privKeyPath string, err error)

ExtractCaddyPaths attempts to extract cert and private key through the layers of abstractions from the domain name

Types

type CertificateFiles

type CertificateFiles struct {
	CertPath    string
	PrivKeyPath string
}

func HandleWildcardCertificates

func HandleWildcardCertificates(domain, email string, store *Provider, debug bool, customResolvers []string) ([]tls.Certificate, []CertificateFiles, error)

HandleWildcardCertificates handles ACME wildcard cert generation with DNS challenge using certmagic library from caddyserver.

type Provider

type Provider struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider() *Provider

func (*Provider) AppendRecords

func (p *Provider) AppendRecords(ctx context.Context, zoneName string, recs []libdns.Record) ([]libdns.Record, error)

func (*Provider) DeleteRecords

func (p *Provider) DeleteRecords(ctx context.Context, zoneName string, recs []libdns.Record) ([]libdns.Record, error)

func (*Provider) GetRecords

func (p *Provider) GetRecords(ctx context.Context, zoneName string) ([]libdns.Record, error)

type RecordStore

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

Jump to

Keyboard shortcuts

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