Fix self-signed certificate creation
This commit is contained in:
parent
5f9a8a9f4f
commit
92b0de1db6
|
@ -278,14 +278,12 @@ func createSelfSignedCertificate() ([]byte, []byte) {
|
|||
Subject: pkix.Name{},
|
||||
NotBefore: time.Unix(0, 0).UTC(),
|
||||
NotAfter: time.Date(time.Now().UTC().Year()+10, 0, 0, 0, 0, 0, 0, time.UTC),
|
||||
KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign,
|
||||
KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment,
|
||||
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
|
||||
BasicConstraintsValid: true,
|
||||
IsCA: true,
|
||||
MaxPathLen: 1,
|
||||
}
|
||||
|
||||
privateBogusKey, err := ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
|
||||
privateBogusKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue