Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
perf: generate ecdsa key instead of rsa
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolSpring8 committed Jul 4, 2020
1 parent 7e8a7dc commit f6414cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/cert/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
package cert

import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
Expand Down Expand Up @@ -47,7 +48,7 @@ func GetCA() ([]byte, []byte, error) {

// files do not exist, make new ones instead
// source: https://golang.org/src/crypto/tls/generate_cert.go
priv, err := rsa.GenerateKey(rand.Reader, 2048)
priv, err := ecdsa.GenerateKey(elliptic.P224(), rand.Reader)
panicOnErr(err)
serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
Expand Down

0 comments on commit f6414cb

Please sign in to comment.