Skip to content

Commit

Permalink
test: move x25519 keypair to fixtures/keys/
Browse files Browse the repository at this point in the history
PR-URL: #27962
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
reasonablytall authored and BridgeAR committed Jun 17, 2019
1 parent 1f2de2f commit 686cb13
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
8 changes: 8 additions & 0 deletions test/fixtures/keys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/keys/x25519_private.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VuBCIEIJi/yFpueUawC1BkXyWM8ONIBGFjL7UZHrD/Zo/KPDpn
-----END PRIVATE KEY-----
3 changes: 3 additions & 0 deletions test/fixtures/keys/x25519_public.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VuAyEAaSb8Q+RndwfNnPeOYGYPDUN3uhAPnMLzXyfi+mqfhig=
-----END PUBLIC KEY-----
3 changes: 0 additions & 3 deletions test/fixtures/test_x25519_privkey.pem

This file was deleted.

3 changes: 0 additions & 3 deletions test/fixtures/test_x25519_pubkey.pem

This file was deleted.

4 changes: 2 additions & 2 deletions test/parallel/test-crypto-key-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit 686cb13

Please sign in to comment.