Skip to content

Commit

Permalink
Fixing name on CA cert to something a bit better.
Browse files Browse the repository at this point in the history
  • Loading branch information
brimstone committed Sep 16, 2015
1 parent de85e3c commit f0a2e56
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ca/ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
//"errors"
"crypto/rand"
"crypto/x509"
gopkix "crypto/x509/pkix"
"io/ioutil"
"math/big"
"os"
Expand Down Expand Up @@ -63,8 +64,10 @@ func NewCA(rootDir string) (*CA, error) {
keyUsage := x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature
extKeyUsage := []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}
template := &x509.Certificate{
SerialNumber: big.NewInt(1),
Subject: pkix.GenSubject("try.subca.com"),
SerialNumber: big.NewInt(1),
Subject: gopkix.Name{
CommonName: "try.sbuca.com",
},
NotBefore: notBefore,
NotAfter: notAfter,
KeyUsage: keyUsage,
Expand Down

0 comments on commit f0a2e56

Please sign in to comment.