aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-06-01 16:17:32 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-06-01 16:17:32 +0200
commit47cc770e483b3c0c9e088d8baf9d8076ab7a65c0 (patch)
tree40533f22b133cbfeb156773bdf3e21f3d1992d66
parentc7ca99f711f064f947e8d0c9aa4eeaa1c6a5e0c2 (diff)
Replace CN with SAN as per RFC
-rw-r--r--crypto.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto.go b/crypto.go
index 366188b..192dde8 100644
--- a/crypto.go
+++ b/crypto.go
@@ -99,10 +99,7 @@ func NewKey(size int) (crypto.PrivateKey, error) {
var oidMailAddress = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 1}
func NewCSR(key crypto.PrivateKey, altnames []string, email string) (string, error) {
- tmpl := x509.CertificateRequest{
- Subject: pkix.Name{CommonName: altnames[0]},
- DNSNames: altnames,
- }
+ tmpl := x509.CertificateRequest{DNSNames: altnames}
if email != "" {
m := pkix.AttributeTypeAndValue{
Type: oidMailAddress,