Skip to content

Commit

Permalink
test: move ed25519 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 687e57f commit 1f2de2f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
4 changes: 4 additions & 0 deletions test/fixtures/keys/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* -text

Makefile text
*.cnf text
8 changes: 8 additions & 0 deletions test/fixtures/keys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ all: \
rsa_pss_public_2048.pem \
rsa_pss_public_2048_sha256_sha256_16.pem \
rsa_pss_public_2048_sha512_sha256_20.pem \
ed25519_private.pem \
ed25519_public.pem \

#
# Create Certificate Authority: ca1
Expand Down Expand Up @@ -598,6 +600,12 @@ rsa_pss_public_2048_sha256_sha256_16.pem: rsa_pss_private_2048_sha256_sha256_16.
rsa_pss_public_2048_sha512_sha256_20.pem: rsa_pss_private_2048_sha512_sha256_20.pem
openssl pkey -in rsa_pss_private_2048_sha512_sha256_20.pem -pubout -out rsa_pss_public_2048_sha512_sha256_20.pem

ed25519_private.pem:
openssl genpkey -algorithm ED25519 -out ed25519_private.pem

ed25519_public.pem: ed25519_private.pem
openssl pkey -in ed25519_private.pem -pubout -out ed25519_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/ed25519_private.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIMFSujN0jIUIdzSvuxka0lfgVVkMdRTuaVvIYUHrvzXQ
-----END PRIVATE KEY-----
3 changes: 3 additions & 0 deletions test/fixtures/keys/ed25519_public.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAK1wIouqnuiA04b3WrMa+xKIKIpfHetNZRv3h9fBf768=
-----END PUBLIC KEY-----
3 changes: 0 additions & 3 deletions test/fixtures/test_ed25519_privkey.pem

This file was deleted.

3 changes: 0 additions & 3 deletions test/fixtures/test_ed25519_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 @@ -203,8 +203,8 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
}

[
{ private: fixtures.readSync('test_ed25519_privkey.pem', 'ascii'),
public: fixtures.readSync('test_ed25519_pubkey.pem', 'ascii'),
{ 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'),
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-crypto-sign-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ common.expectsError(
}

[
{ private: fixtures.readSync('test_ed25519_privkey.pem', 'ascii'),
public: fixtures.readSync('test_ed25519_pubkey.pem', 'ascii'),
{ private: fixtures.readKey('ed25519_private.pem', 'ascii'),
public: fixtures.readKey('ed25519_public.pem', 'ascii'),
algo: null,
sigLen: 64 },
{ private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'),
Expand Down

0 comments on commit 1f2de2f

Please sign in to comment.