From 47cc770e483b3c0c9e088d8baf9d8076ab7a65c0 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 1 Jun 2016 16:17:32 +0200 Subject: Replace CN with SAN as per RFC --- crypto.go | 5 +---- 1 file changed, 1 insertion(+), 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, -- cgit v1.2.3