summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Aubuchon <alex@aub.dev>2019-05-28 11:47:01 -0700
committerAli Ijaz Sheikh <ofrobots@google.com>2019-06-05 11:37:32 -0700
commitee00111f2062ffe67d18de04a178ac39ed58f503 (patch)
tree1700cf42d8e5919799f1a28773ebec6d0fd7e407
parent8091df065ee1cdb8580a4a263f97f0b0750ca1f6 (diff)
downloadnode-new-ee00111f2062ffe67d18de04a178ac39ed58f503.tar.gz
test: move x25519 keypair to fixtures/keys/
PR-URL: https://github.com/nodejs/node/pull/27962 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-rw-r--r--test/fixtures/keys/Makefile8
-rw-r--r--test/fixtures/keys/x25519_private.pem3
-rw-r--r--test/fixtures/keys/x25519_public.pem3
-rw-r--r--test/fixtures/test_x25519_privkey.pem3
-rw-r--r--test/fixtures/test_x25519_pubkey.pem3
-rw-r--r--test/parallel/test-crypto-key-objects.js4
6 files changed, 16 insertions, 8 deletions
diff --git a/test/fixtures/keys/Makefile b/test/fixtures/keys/Makefile
index 72a0cb5718..85253ad967 100644
--- a/test/fixtures/keys/Makefile
+++ b/test/fixtures/keys/Makefile
@@ -45,6 +45,8 @@ all: \
rsa_pss_public_2048_sha512_sha256_20.pem \
ed25519_private.pem \
ed25519_public.pem \
+ x25519_private.pem \
+ x25519_public.pem \
#
# Create Certificate Authority: ca1
@@ -606,6 +608,12 @@ ed25519_private.pem:
ed25519_public.pem: ed25519_private.pem
openssl pkey -in ed25519_private.pem -pubout -out ed25519_public.pem
+x25519_private.pem:
+ openssl genpkey -algorithm x25519 -out x25519_private.pem
+
+x25519_public.pem: x25519_private.pem
+ openssl pkey -in x25519_private.pem -pubout -out x25519_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/x25519_private.pem b/test/fixtures/keys/x25519_private.pem
new file mode 100644
index 0000000000..926c4e3a2b
--- /dev/null
+++ b/test/fixtures/keys/x25519_private.pem
@@ -0,0 +1,3 @@
+-----BEGIN PRIVATE KEY-----
+MC4CAQAwBQYDK2VuBCIEIJi/yFpueUawC1BkXyWM8ONIBGFjL7UZHrD/Zo/KPDpn
+-----END PRIVATE KEY-----
diff --git a/test/fixtures/keys/x25519_public.pem b/test/fixtures/keys/x25519_public.pem
new file mode 100644
index 0000000000..e2d756bd17
--- /dev/null
+++ b/test/fixtures/keys/x25519_public.pem
@@ -0,0 +1,3 @@
+-----BEGIN PUBLIC KEY-----
+MCowBQYDK2VuAyEAaSb8Q+RndwfNnPeOYGYPDUN3uhAPnMLzXyfi+mqfhig=
+-----END PUBLIC KEY-----
diff --git a/test/fixtures/test_x25519_privkey.pem b/test/fixtures/test_x25519_privkey.pem
deleted file mode 100644
index b2f60cca40..0000000000
--- a/test/fixtures/test_x25519_privkey.pem
+++ /dev/null
@@ -1,3 +0,0 @@
------BEGIN PRIVATE KEY-----
-MC4CAQAwBQYDK2VuBCIEILD/13Y5R/tmcCjZVSooIcpfGvZxf+qt6dMu5FYaOC1a
------END PRIVATE KEY-----
diff --git a/test/fixtures/test_x25519_pubkey.pem b/test/fixtures/test_x25519_pubkey.pem
deleted file mode 100644
index 3d1e7b835e..0000000000
--- a/test/fixtures/test_x25519_pubkey.pem
+++ /dev/null
@@ -1,3 +0,0 @@
------BEGIN PUBLIC KEY-----
-MCowBQYDK2VuAyEAYHCXnz085FKclfnx+gdiGXAyy7BhJjx0pxyE4wbXF0A=
------END PUBLIC KEY-----
diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js
index 0ec7dc1d74..747bb7c64d 100644
--- a/test/parallel/test-crypto-key-objects.js
+++ b/test/parallel/test-crypto-key-objects.js
@@ -209,8 +209,8 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
{ private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'),
public: fixtures.readSync('test_ed448_pubkey.pem', 'ascii'),
keyType: 'ed448' },
- { private: fixtures.readSync('test_x25519_privkey.pem', 'ascii'),
- public: fixtures.readSync('test_x25519_pubkey.pem', 'ascii'),
+ { private: fixtures.readKey('x25519_private.pem', 'ascii'),
+ public: fixtures.readKey('x25519_public.pem', 'ascii'),
keyType: 'x25519' },
{ private: fixtures.readSync('test_x448_privkey.pem', 'ascii'),
public: fixtures.readSync('test_x448_pubkey.pem', 'ascii'),