caddytls: removed useless code in selfsigned (#2494)

removed "names": is not used
This commit is contained in:
Matthias Schneider 2019-03-01 16:35:05 +01:00 committed by Matt Holt
parent 72d0debde6
commit 448edcca8e

View file

@ -62,13 +62,10 @@ func newSelfSignedCertificate(ssconfig selfSignedConfig) (tls.Certificate, error
if len(ssconfig.SAN) == 0 {
ssconfig.SAN = []string{""}
}
var names []string
for _, san := range ssconfig.SAN {
if ip := net.ParseIP(san); ip != nil {
names = append(names, strings.ToLower(ip.String()))
cert.IPAddresses = append(cert.IPAddresses, ip)
} else {
names = append(names, strings.ToLower(san))
cert.DNSNames = append(cert.DNSNames, strings.ToLower(san))
}
}