Skip to content

Commit

Permalink
Include DNS alt name in certificate
Browse files Browse the repository at this point in the history
Closes: #2664
  • Loading branch information
Alessio Treglia committed Nov 2, 2018
1 parent f4d3e65 commit 91dcd0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/lcd/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ func generateSelfSignedCert(host string) (certBytes []byte, priv *ecdsa.PrivateK
Subject: pkix.Name{
Organization: []string{"Gaia Lite"},
},
DNSNames: []string{"localhost"},
NotBefore: notBefore,
NotAfter: notAfter,
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
BasicConstraintsValid: true,
IsCA: true,
IsCA: true,
}
hosts := strings.Split(host, ",")
for _, h := range hosts {
Expand Down

0 comments on commit 91dcd0f

Please sign in to comment.