Skip to content

Commit b781eaf

Browse files
joyeecheungnodejs-github-bot
authored andcommitted
test: reduce length in crypto keygen tests
PR-URL: #49221 Refs: #49202 Refs: #41206 Reviewed-By: Luigi Pinca <[email protected]>
1 parent b9a6ab5 commit b781eaf

4 files changed

+4
-4
lines changed

test/parallel/test-crypto-keygen-async-elliptic-curve-jwk-rsa.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const {
1212
// Test async elliptic curve key generation with 'jwk' encoding and RSA.
1313
{
1414
generateKeyPair('rsa', {
15-
modulusLength: 4096,
15+
modulusLength: 1024,
1616
publicKeyEncoding: {
1717
format: 'jwk'
1818
},

test/parallel/test-crypto-keygen-dh-classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const {
1212
// Test classic Diffie-Hellman key generation.
1313
{
1414
generateKeyPair('dh', {
15-
primeLength: 1024
15+
primeLength: 512
1616
}, common.mustSucceed((publicKey, privateKey) => {
1717
assert.strictEqual(publicKey.type, 'public');
1818
assert.strictEqual(publicKey.asymmetricKeyType, 'dh');

test/parallel/test-crypto-keygen-empty-passphrase-no-error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const {
1212
// Passing an empty passphrase string should not throw ERR_OSSL_CRYPTO_MALLOC_FAILURE even on OpenSSL 3.
1313
// Regression test for https://github.com/nodejs/node/issues/41428.
1414
generateKeyPair('rsa', {
15-
modulusLength: 4096,
15+
modulusLength: 1024,
1616
publicKeyEncoding: {
1717
type: 'spki',
1818
format: 'pem'

test/parallel/test-crypto-keygen-invalid-parameter-encoding-dsa.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const {
1313
// Test invalid parameter encoding.
1414
{
1515
assert.throws(() => generateKeyPairSync('dsa', {
16-
modulusLength: 4096,
16+
modulusLength: 1024,
1717
publicKeyEncoding: {
1818
format: 'jwk'
1919
},

0 commit comments

Comments
 (0)