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 nodejs-github-bot committed Aug 31, 2023
1 parent b9a6ab5 commit b781eaf
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 b781eaf

Please sign in to comment.