Skip to content

Commit 37c1917

Browse files
committed
We need to use two different CommonName
1 parent 0f756a3 commit 37c1917

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

certificates.go

+5
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func generateSingleCertificate(isCa bool) (*x509.Certificate, error) {
125125
if isCa {
126126
template.IsCA = true
127127
template.KeyUsage |= x509.KeyUsageCertSign
128+
template.Subject.CommonName = "Arduino"
128129
}
129130

130131
return &template, nil
@@ -209,4 +210,8 @@ func generateCertificates() {
209210
pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes})
210211
certOut.Close()
211212
log.Print("written cert.pem")
213+
214+
ioutil.WriteFile("cert.cer", derBytes, 0644)
215+
log.Print("written cert.cer")
216+
212217
}

0 commit comments

Comments
 (0)