mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-22 16:46:53 +01:00
caddytls: removed useless code in selfsigned (#2494)
removed "names": is not used
This commit is contained in:
parent
72d0debde6
commit
448edcca8e
1 changed files with 0 additions and 3 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue