From a251831febe2fabb1233361c5ffe9f55c34a86b9 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 8 Sep 2016 18:29:44 -0600 Subject: [PATCH] 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. --- caddytls/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddytls/config.go b/caddytls/config.go index 9525682b0..ea072aa11 100644 --- a/caddytls/config.go +++ b/caddytls/config.go @@ -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 }