Skip to content

Commit 686cb13

Browse files
reasonablytallBridgeAR
authored andcommitted
test: move x25519 keypair to fixtures/keys/
PR-URL: #27962 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 1f2de2f commit 686cb13

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

test/fixtures/keys/Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ all: \
4545
rsa_pss_public_2048_sha512_sha256_20.pem \
4646
ed25519_private.pem \
4747
ed25519_public.pem \
48+
x25519_private.pem \
49+
x25519_public.pem \
4850

4951
#
5052
# Create Certificate Authority: ca1
@@ -606,6 +608,12 @@ ed25519_private.pem:
606608
ed25519_public.pem: ed25519_private.pem
607609
openssl pkey -in ed25519_private.pem -pubout -out ed25519_public.pem
608610

611+
x25519_private.pem:
612+
openssl genpkey -algorithm x25519 -out x25519_private.pem
613+
614+
x25519_public.pem: x25519_private.pem
615+
openssl pkey -in x25519_private.pem -pubout -out x25519_public.pem
616+
609617
clean:
610618
rm -f *.pfx *.pem *.srl ca2-database.txt ca2-serial fake-startcom-root-serial *.print *.old fake-startcom-root-issued-certs/*.pem
611619
@> fake-startcom-root-database.txt

test/fixtures/keys/x25519_private.pem

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MC4CAQAwBQYDK2VuBCIEIJi/yFpueUawC1BkXyWM8ONIBGFjL7UZHrD/Zo/KPDpn
3+
-----END PRIVATE KEY-----

test/fixtures/keys/x25519_public.pem

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-----BEGIN PUBLIC KEY-----
2+
MCowBQYDK2VuAyEAaSb8Q+RndwfNnPeOYGYPDUN3uhAPnMLzXyfi+mqfhig=
3+
-----END PUBLIC KEY-----

test/fixtures/test_x25519_privkey.pem

-3
This file was deleted.

test/fixtures/test_x25519_pubkey.pem

-3
This file was deleted.

test/parallel/test-crypto-key-objects.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
209209
{ private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'),
210210
public: fixtures.readSync('test_ed448_pubkey.pem', 'ascii'),
211211
keyType: 'ed448' },
212-
{ private: fixtures.readSync('test_x25519_privkey.pem', 'ascii'),
213-
public: fixtures.readSync('test_x25519_pubkey.pem', 'ascii'),
212+
{ private: fixtures.readKey('x25519_private.pem', 'ascii'),
213+
public: fixtures.readKey('x25519_public.pem', 'ascii'),
214214
keyType: 'x25519' },
215215
{ private: fixtures.readSync('test_x448_privkey.pem', 'ascii'),
216216
public: fixtures.readSync('test_x448_pubkey.pem', 'ascii'),

0 commit comments

Comments
 (0)