Skip to content

Commit

Permalink
test: reduce length in crypto keygen tests
Browse files Browse the repository at this point in the history
PR-URL: #49221
Refs: #49202
Refs: #41206
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
joyeecheung authored and targos committed Nov 27, 2023
1 parent 958e114 commit 67cb6f9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {
// Test async elliptic curve key generation with 'jwk' encoding and RSA.
{
generateKeyPair('rsa', {
modulusLength: 4096,
modulusLength: 1024,
publicKeyEncoding: {
format: 'jwk'
},
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-keygen-dh-classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {
// Test classic Diffie-Hellman key generation.
{
generateKeyPair('dh', {
primeLength: 1024
primeLength: 512
}, common.mustSucceed((publicKey, privateKey) => {
assert.strictEqual(publicKey.type, 'public');
assert.strictEqual(publicKey.asymmetricKeyType, 'dh');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {
// Passing an empty passphrase string should not throw ERR_OSSL_CRYPTO_MALLOC_FAILURE even on OpenSSL 3.
// Regression test for https://github.com/nodejs/node/issues/41428.
generateKeyPair('rsa', {
modulusLength: 4096,
modulusLength: 1024,
publicKeyEncoding: {
type: 'spki',
format: 'pem'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {
// Test invalid parameter encoding.
{
assert.throws(() => generateKeyPairSync('dsa', {
modulusLength: 4096,
modulusLength: 1024,
publicKeyEncoding: {
format: 'jwk'
},
Expand Down

0 comments on commit 67cb6f9

Please sign in to comment.