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: nodejs/node#49221
Refs: nodejs/node#49202
Refs: nodejs/node#41206
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
sercher committed Apr 25, 2024
1 parent 2aa755e commit dc50f7f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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
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
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
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 dc50f7f

Please sign in to comment.