Skip to content

Commit

Permalink
Different issuers for root and leaf
Browse files Browse the repository at this point in the history
  • Loading branch information
vsliouniaev committed Nov 18, 2020
1 parent cf43f01 commit cb0f294
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/certs/certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func GenerateCerts(host string) (ca []byte, cert []byte, key []byte) {
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
BasicConstraintsValid: true,
IsCA: true,
Subject: pkix.Name{Organization: []string{"nil"}},
Subject: pkix.Name{Organization: []string{"nil1"}},
}

derBytes, err := x509.CreateCertificate(rand.Reader, &rootTemplate, &rootTemplate, &rootKey.PublicKey, rootKey)
Expand Down Expand Up @@ -66,7 +66,7 @@ func GenerateCerts(host string) (ca []byte, cert []byte, key []byte) {
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
BasicConstraintsValid: true,
IsCA: false,
Subject: pkix.Name{Organization: []string{"nil"}},
Subject: pkix.Name{Organization: []string{"nil2"}},
}
hosts := strings.Split(host, ",")
for _, h := range hosts {
Expand Down

0 comments on commit cb0f294

Please sign in to comment.