Fix bug renewing certs affecting Caddyfiles using wildcard addresses

A Caddyfile using *.example.com as its site address would be subject to
this bug at renewal time, as it would use the literal "*.example.com"
value instead of the name being passed in to obtain a certificate.
This change fixes the LoadSite call so that it looks in the proper
directory for the certificate resources.
This commit is contained in:
Matthew Holt 2016-09-08 18:29:44 -06:00
parent 1ea96def31
commit a251831feb

View File

@ -206,7 +206,7 @@ func (c *Config) renewCertName(name string, allowPrompts bool) error {
}()
// Prepare for renewal (load PEM cert, key, and meta)
siteData, err := storage.LoadSite(c.Hostname)
siteData, err := storage.LoadSite(name)
if err != nil {
return err
}