Skip to content

Commit

Permalink
fix: add common name for the node cert
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Apr 12, 2024
1 parent 9da68d3 commit 6014116
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/cockroachdb/certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ func NewTLSConfig() (*TLSConfig, error) {

// exampleSignSelfSignedCert {
nodeCert := tlscert.SelfSignedFromRequest(tlscert.Request{
Name: "node",
Host: "localhost,127.0.0.1",
IPAddresses: []net.IP{net.IPv4(127, 0, 0, 1), net.IPv6loopback},
ValidFor: time.Hour,
Parent: caCert, // using the CA certificate as parent
Name: "node",
SubjectCommonName: "node",
Host: "localhost,127.0.0.1",
IPAddresses: []net.IP{net.IPv4(127, 0, 0, 1), net.IPv6loopback},
ValidFor: time.Hour,
Parent: caCert, // using the CA certificate as parent
})
if nodeCert == nil {
return nil, fmt.Errorf("failed to generate node certificate")
Expand Down

0 comments on commit 6014116

Please sign in to comment.