mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-05 18:44:58 +03:00
Use P384 for TestUser (privateKey) (#1009)
This commit is contained in:
parent
4d76ccb1c4
commit
4b3c532573
1 changed files with 3 additions and 2 deletions
|
@ -2,8 +2,9 @@ package caddytls
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"crypto/ecdsa"
|
||||||
|
"crypto/elliptic"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"crypto/rsa"
|
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -16,7 +17,7 @@ import (
|
||||||
func TestUser(t *testing.T) {
|
func TestUser(t *testing.T) {
|
||||||
defer testStorage.clean()
|
defer testStorage.clean()
|
||||||
|
|
||||||
privateKey, err := rsa.GenerateKey(rand.Reader, 128)
|
privateKey, err := ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Could not generate test private key: %v", err)
|
t.Fatalf("Could not generate test private key: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue