diff options
author | Aziz Rmadi <[email protected]> | 2024-04-15 16:26:56 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-15 21:26:56 +0000 |
commit | 3609a4af75a646cbc83f7eecdf25498170306464 (patch) | |
tree | 86855f1705dd5f9d7f1f51be0d0600344223b75b /modules/caddytls/acmeissuer.go | |
parent | 26748d06b4a39f1e1d02863245573a7ecd1bebc4 (diff) | |
download | caddy-3609a4af75a646cbc83f7eecdf25498170306464.tar.gz caddy-3609a4af75a646cbc83f7eecdf25498170306464.zip |
caddytls: Remove shim code supporting deprecated lego-dns (#6231)
Co-authored-by: Matt Holt <[email protected]>
Diffstat (limited to 'modules/caddytls/acmeissuer.go')
-rw-r--r-- | modules/caddytls/acmeissuer.go | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/modules/caddytls/acmeissuer.go b/modules/caddytls/acmeissuer.go index a14dc61a8..547618e8f 100644 --- a/modules/caddytls/acmeissuer.go +++ b/modules/caddytls/acmeissuer.go @@ -28,7 +28,6 @@ import ( "github.com/caddyserver/certmagic" "github.com/caddyserver/zerossl" - "github.com/mholt/acmez/v2" "github.com/mholt/acmez/v2/acme" "go.uber.org/zap" @@ -135,27 +134,15 @@ func (iss *ACMEIssuer) Provision(ctx caddy.Context) error { if err != nil { return fmt.Errorf("loading DNS provider module: %v", err) } - - if deprecatedProvider, ok := val.(acmez.Solver); ok { - // TODO: For a temporary amount of time, we are allowing the use of DNS - // providers from go-acme/lego since there are so many providers implemented - // using that API -- they are adapted as an all-in-one Caddy module in this - // repository: https://github.com/caddy-dns/lego-deprecated - the module is a - // acmez.Solver type, so we use it directly. The user must set environment - // variables to configure it. Remove this shim once a sufficient number of - // DNS providers are implemented for the libdns APIs instead. - iss.Challenges.DNS.solver = deprecatedProvider - } else { - iss.Challenges.DNS.solver = &certmagic.DNS01Solver{ - DNSManager: certmagic.DNSManager{ - DNSProvider: val.(certmagic.DNSProvider), - TTL: time.Duration(iss.Challenges.DNS.TTL), - PropagationDelay: time.Duration(iss.Challenges.DNS.PropagationDelay), - PropagationTimeout: time.Duration(iss.Challenges.DNS.PropagationTimeout), - Resolvers: iss.Challenges.DNS.Resolvers, - OverrideDomain: iss.Challenges.DNS.OverrideDomain, - }, - } + iss.Challenges.DNS.solver = &certmagic.DNS01Solver{ + DNSManager: certmagic.DNSManager{ + DNSProvider: val.(certmagic.DNSProvider), + TTL: time.Duration(iss.Challenges.DNS.TTL), + PropagationDelay: time.Duration(iss.Challenges.DNS.PropagationDelay), + PropagationTimeout: time.Duration(iss.Challenges.DNS.PropagationTimeout), + Resolvers: iss.Challenges.DNS.Resolvers, + OverrideDomain: iss.Challenges.DNS.OverrideDomain, + }, } } |