crypto/tls: fix generate_cert.go
Fixes #2030. R=golang-dev, gri CC=golang-dev https://golang.org/cl/4635092
This commit is contained in:
parent
a5b2e93aa2
commit
9c8b32c2d6
@ -8,8 +8,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rsa"
|
"big"
|
||||||
|
"crypto/x509/pkix"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
|
"crypto/rsa"
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"encoding/pem"
|
"encoding/pem"
|
||||||
"flag"
|
"flag"
|
||||||
@ -32,8 +34,8 @@ func main() {
|
|||||||
now := time.Seconds()
|
now := time.Seconds()
|
||||||
|
|
||||||
template := x509.Certificate{
|
template := x509.Certificate{
|
||||||
SerialNumber: []byte{0},
|
SerialNumber: new(big.Int).SetInt64(0),
|
||||||
Subject: x509.Name{
|
Subject: pkix.Name{
|
||||||
CommonName: *hostName,
|
CommonName: *hostName,
|
||||||
Organization: []string{"Acme Co"},
|
Organization: []string{"Acme Co"},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user