From 22bbdc5068cbeb8136d6f6fb2895e176adee4970 Mon Sep 17 00:00:00 2001 From: Alex Aubuchon Date: Tue, 28 May 2019 14:40:58 -0700 Subject: [PATCH] test: move ed448 keypairs to fixtures/keys/ PR-URL: https://github.com/nodejs/node/pull/27962 Reviewed-By: Sam Roberts Reviewed-By: Ujjwal Sharma Reviewed-By: Rich Trott --- test/fixtures/keys/Makefile | 8 ++++++++ test/fixtures/keys/ed448_private.pem | 4 ++++ test/fixtures/keys/ed448_public.pem | 4 ++++ test/fixtures/test_ed448_privkey.pem | 4 ---- test/fixtures/test_ed448_pubkey.pem | 4 ---- test/parallel/test-crypto-key-objects.js | 4 ++-- test/parallel/test-crypto-sign-verify.js | 4 ++-- 7 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 test/fixtures/keys/ed448_private.pem create mode 100644 test/fixtures/keys/ed448_public.pem delete mode 100644 test/fixtures/test_ed448_privkey.pem delete mode 100644 test/fixtures/test_ed448_pubkey.pem diff --git a/test/fixtures/keys/Makefile b/test/fixtures/keys/Makefile index 03a3011056adc6..f12664908f6f19 100644 --- a/test/fixtures/keys/Makefile +++ b/test/fixtures/keys/Makefile @@ -62,6 +62,8 @@ all: \ ed25519_public.pem \ x25519_private.pem \ x25519_public.pem \ + ed448_private.pem \ + ed448_public.pem \ # # Create Certificate Authority: ca1 @@ -674,6 +676,12 @@ x25519_private.pem: x25519_public.pem: x25519_private.pem openssl pkey -in x25519_private.pem -pubout -out x25519_public.pem +ed448_private.pem: + openssl genpkey -algorithm ed448 -out ed448_private.pem + +ed448_public.pem: ed448_private.pem + openssl pkey -in ed448_private.pem -pubout -out ed448_public.pem + clean: rm -f *.pfx *.pem *.srl ca2-database.txt ca2-serial fake-startcom-root-serial *.print *.old fake-startcom-root-issued-certs/*.pem @> fake-startcom-root-database.txt diff --git a/test/fixtures/keys/ed448_private.pem b/test/fixtures/keys/ed448_private.pem new file mode 100644 index 00000000000000..9643665d67656d --- /dev/null +++ b/test/fixtures/keys/ed448_private.pem @@ -0,0 +1,4 @@ +-----BEGIN PRIVATE KEY----- +MEcCAQAwBQYDK2VxBDsEOdOtCnu9bDdBqSHNNZ5xoDA5KdLBTUNPcKFaOADNX32s +dfpo52pCtPqfku/l3/OfUHsF43EfZsaaWA== +-----END PRIVATE KEY----- diff --git a/test/fixtures/keys/ed448_public.pem b/test/fixtures/keys/ed448_public.pem new file mode 100644 index 00000000000000..b767109b187ee2 --- /dev/null +++ b/test/fixtures/keys/ed448_public.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MEMwBQYDK2VxAzoAoX/ee5+jlcU53+BbGRsGIzly0V+SZtJ/oGXY0udf84q2hTW2 +RdstLktvwpkVJOoNb7oDgc2V5ZUA +-----END PUBLIC KEY----- diff --git a/test/fixtures/test_ed448_privkey.pem b/test/fixtures/test_ed448_privkey.pem deleted file mode 100644 index b430a7ee7ca56b..00000000000000 --- a/test/fixtures/test_ed448_privkey.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PRIVATE KEY----- -MEcCAQAwBQYDK2VxBDsEObxytD95dGN3Hxk7kVk+Lig1rGYTRr3YdaHjRog++Sgk -QD7KwKmxroBURtkE2N0JbQ3ctdrpGRB5DQ== ------END PRIVATE KEY----- diff --git a/test/fixtures/test_ed448_pubkey.pem b/test/fixtures/test_ed448_pubkey.pem deleted file mode 100644 index 5619b93aeb0310..00000000000000 --- a/test/fixtures/test_ed448_pubkey.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MEMwBQYDK2VxAzoAIESY3jnpGdB5UVJDCznrv0vmBFIzgSMu+gafsbCX1rFtsJwR -M6XUDQiEY7dk6rmm/Fktyawna5EA ------END PUBLIC KEY----- diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js index 591d3904563960..12c3ba4ff1ef94 100644 --- a/test/parallel/test-crypto-key-objects.js +++ b/test/parallel/test-crypto-key-objects.js @@ -206,8 +206,8 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem', { private: fixtures.readKey('ed25519_private.pem', 'ascii'), public: fixtures.readKey('ed25519_public.pem', 'ascii'), keyType: 'ed25519' }, - { private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'), - public: fixtures.readSync('test_ed448_pubkey.pem', 'ascii'), + { private: fixtures.readKey('ed448_private.pem', 'ascii'), + public: fixtures.readKey('ed448_public.pem', 'ascii'), keyType: 'ed448' }, { private: fixtures.readKey('x25519_private.pem', 'ascii'), public: fixtures.readKey('x25519_public.pem', 'ascii'), diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js index 2da2a91655cfdd..0c7f4fb0bc9e37 100644 --- a/test/parallel/test-crypto-sign-verify.js +++ b/test/parallel/test-crypto-sign-verify.js @@ -422,8 +422,8 @@ common.expectsError( public: fixtures.readKey('ed25519_public.pem', 'ascii'), algo: null, sigLen: 64 }, - { private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'), - public: fixtures.readSync('test_ed448_pubkey.pem', 'ascii'), + { private: fixtures.readKey('ed448_private.pem', 'ascii'), + public: fixtures.readKey('ed448_public.pem', 'ascii'), algo: null, sigLen: 114 }, { private: fixtures.readKey('rsa_private_2048.pem', 'ascii'),