diff options
author | Matthew Holt <[email protected]> | 2020-04-30 16:15:20 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2020-04-30 16:15:20 -0600 |
commit | a1796c2f147e6a3d395e015600b51b67136292eb (patch) | |
tree | 1df99e0506a235d3235c12ac018952fbd9354aa3 /caddyconfig | |
parent | f931c26f68030861df340c65c2ebd835f1eda11e (diff) | |
download | caddy-a1796c2f147e6a3d395e015600b51b67136292eb.tar.gz caddy-a1796c2f147e6a3d395e015600b51b67136292eb.zip |
caddytls: Adjust DNS challenge structure; clarify some docs
Diffstat (limited to 'caddyconfig')
-rw-r--r-- | caddyconfig/httpcaddyfile/builtins.go | 3 | ||||
-rw-r--r-- | caddyconfig/httpcaddyfile/tlsapp.go | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/caddyconfig/httpcaddyfile/builtins.go b/caddyconfig/httpcaddyfile/builtins.go index 1efe5accc..8137ce2ae 100644 --- a/caddyconfig/httpcaddyfile/builtins.go +++ b/caddyconfig/httpcaddyfile/builtins.go @@ -211,12 +211,13 @@ func parseTLS(h Helper) ([]ConfigValue, error) { provName := h.Val() if acmeIssuer.Challenges == nil { acmeIssuer.Challenges = new(caddytls.ChallengesConfig) + acmeIssuer.Challenges.DNS = new(caddytls.DNSChallengeConfig) } dnsProvModule, err := caddy.GetModule("tls.dns." + provName) if err != nil { return nil, h.Errf("getting DNS provider module named '%s': %v", provName, err) } - acmeIssuer.Challenges.DNSRaw = caddyconfig.JSONModuleObject(dnsProvModule.New(), "provider", provName, h.warnings) + acmeIssuer.Challenges.DNS.ProviderRaw = caddyconfig.JSONModuleObject(dnsProvModule.New(), "name", provName, h.warnings) case "ca_root": arg := h.RemainingArgs() diff --git a/caddyconfig/httpcaddyfile/tlsapp.go b/caddyconfig/httpcaddyfile/tlsapp.go index f66fcae71..88c126071 100644 --- a/caddyconfig/httpcaddyfile/tlsapp.go +++ b/caddyconfig/httpcaddyfile/tlsapp.go @@ -388,7 +388,9 @@ func newBaseAutomationPolicy(options map[string]interface{}, warnings []caddycon return nil, fmt.Errorf("getting DNS provider module named '%s': %v", provName, err) } mgr.Challenges = &caddytls.ChallengesConfig{ - DNSRaw: caddyconfig.JSONModuleObject(dnsProvModule.New(), "provider", provName, &warnings), + DNS: &caddytls.DNSChallengeConfig{ + ProviderRaw: caddyconfig.JSONModuleObject(dnsProvModule.New(), "name", provName, &warnings), + }, } } if acmeCARoot != nil { |