tls: Couple of quick fixes for 4d18587192e4fffe5b34b714eaabcfc212914c1e

This commit is contained in:
Matthew Holt
2020-03-07 11:47:55 -07:00
parent 4d18587192
commit 217419f6d9
2 changed files with 10 additions and 5 deletions

View File

@ -318,6 +318,9 @@ func (app *App) createAutomationPolicy(ctx caddy.Context) error {
// if it has an ACME issuer, maybe we can just use that
acmeIssuer, _ = matchingPolicy.Issuer.(*caddytls.ACMEIssuer)
}
if acmeIssuer == nil {
acmeIssuer = new(caddytls.ACMEIssuer)
}
if acmeIssuer.Challenges == nil {
acmeIssuer.Challenges = new(caddytls.ChallengesConfig)
}