From 40bfc3f89002a3d6c6f1d4f97cec8779ba6de383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Fri, 30 Oct 2015 20:44:05 +0100 Subject: [PATCH] Don't use elliptic.P224() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This curve is not available on Fedora and RHEL systems, so removing the reference allows tests to pass there. Vast majority of the curve-specific work is done in the golang crypto/elliptic package, so this does not weaken the tests noticeably. Signed-off-by: Miloslav Trmač --- tuf/signed/verifiers_test.go | 2 +- utils/tls_config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tuf/signed/verifiers_test.go b/tuf/signed/verifiers_test.go index dc7d093e73..855767a1ae 100644 --- a/tuf/signed/verifiers_test.go +++ b/tuf/signed/verifiers_test.go @@ -293,7 +293,7 @@ func TestECDSAVerifier(t *testing.T) { } func TestECDSAVerifierOtherCurves(t *testing.T) { - curves := []elliptic.Curve{elliptic.P224(), elliptic.P256(), elliptic.P384(), elliptic.P521()} + curves := []elliptic.Curve{elliptic.P256(), elliptic.P384(), elliptic.P521()} for _, curve := range curves { ecdsaPrivKey, err := ecdsa.GenerateKey(curve, rand.Reader) diff --git a/utils/tls_config_test.go b/utils/tls_config_test.go index 75c53e8809..3854de22e0 100644 --- a/utils/tls_config_test.go +++ b/utils/tls_config_test.go @@ -31,7 +31,7 @@ func generateMultiCert(t *testing.T) string { rsaKey, err := rsa.GenerateKey(rand.Reader, 2048) assert.NoError(t, err) - ecKey, err := ecdsa.GenerateKey(elliptic.P224(), rand.Reader) + ecKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) assert.NoError(t, err) template, err := trustmanager.NewCertificate("gun") assert.NoError(t, err)