Skip to content

Commit adb0197

Browse files
reasonablytallBridgeAR
authored andcommitted
test: move ed25519 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 14bd26c commit adb0197

File tree

8 files changed

+22
-10
lines changed

8 files changed

+22
-10
lines changed

test/fixtures/keys/.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* -text
2+
3+
Makefile text
4+
*.cnf text

test/fixtures/keys/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ all: \
4343
rsa_pss_public_2048.pem \
4444
rsa_pss_public_2048_sha256_sha256_16.pem \
4545
rsa_pss_public_2048_sha512_sha256_20.pem \
46+
ed25519_private.pem \
47+
ed25519_public.pem \
4648

4749
#
4850
# Create Certificate Authority: ca1
@@ -598,6 +600,12 @@ rsa_pss_public_2048_sha256_sha256_16.pem: rsa_pss_private_2048_sha256_sha256_16.
598600
rsa_pss_public_2048_sha512_sha256_20.pem: rsa_pss_private_2048_sha512_sha256_20.pem
599601
openssl pkey -in rsa_pss_private_2048_sha512_sha256_20.pem -pubout -out rsa_pss_public_2048_sha512_sha256_20.pem
600602

603+
ed25519_private.pem:
604+
openssl genpkey -algorithm ED25519 -out ed25519_private.pem
605+
606+
ed25519_public.pem: ed25519_private.pem
607+
openssl pkey -in ed25519_private.pem -pubout -out ed25519_public.pem
608+
601609
clean:
602610
rm -f *.pfx *.pem *.srl ca2-database.txt ca2-serial fake-startcom-root-serial *.print *.old fake-startcom-root-issued-certs/*.pem
603611
@> fake-startcom-root-database.txt
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MC4CAQAwBQYDK2VwBCIEIMFSujN0jIUIdzSvuxka0lfgVVkMdRTuaVvIYUHrvzXQ
3+
-----END PRIVATE KEY-----

test/fixtures/keys/ed25519_public.pem

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-----BEGIN PUBLIC KEY-----
2+
MCowBQYDK2VwAyEAK1wIouqnuiA04b3WrMa+xKIKIpfHetNZRv3h9fBf768=
3+
-----END PUBLIC KEY-----

test/fixtures/test_ed25519_privkey.pem

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/fixtures/test_ed25519_pubkey.pem

Lines changed: 0 additions & 3 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
203203
}
204204

205205
[
206-
{ private: fixtures.readSync('test_ed25519_privkey.pem', 'ascii'),
207-
public: fixtures.readSync('test_ed25519_pubkey.pem', 'ascii'),
206+
{ private: fixtures.readKey('ed25519_private.pem', 'ascii'),
207+
public: fixtures.readKey('ed25519_public.pem', 'ascii'),
208208
keyType: 'ed25519' },
209209
{ private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'),
210210
public: fixtures.readSync('test_ed448_pubkey.pem', 'ascii'),

test/parallel/test-crypto-sign-verify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ common.expectsError(
418418
}
419419

420420
[
421-
{ private: fixtures.readSync('test_ed25519_privkey.pem', 'ascii'),
422-
public: fixtures.readSync('test_ed25519_pubkey.pem', 'ascii'),
421+
{ private: fixtures.readKey('ed25519_private.pem', 'ascii'),
422+
public: fixtures.readKey('ed25519_public.pem', 'ascii'),
423423
algo: null,
424424
sigLen: 64 },
425425
{ private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'),

0 commit comments

Comments
 (0)