summaryrefslogtreecommitdiff
path: root/test/parallel/test-crypto-keygen.js
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2023-03-22 12:41:15 +0100
committerGitHub <noreply@github.com>2023-03-22 11:41:15 +0000
commit1a18b440287dac1bdc0d4adc818db2ce8e1a1503 (patch)
tree4c609d17b68cd43779920f3bb5bb143eb526d79e /test/parallel/test-crypto-keygen.js
parent7d84d67364863e328e1612882a61546a895ebc1a (diff)
downloadnode-new-1a18b440287dac1bdc0d4adc818db2ce8e1a1503.tar.gz
src: replace impossible THROW with CHECK
The JS layer already verifies that divisor_bits is either a non-negative 32-bit signed integer or null/undefined, in which case it passes -1 to the C++ layer. In either case, the C++ layer receives a 32-bit signed integer greater than or equal to -1. PR-URL: https://github.com/nodejs/node/pull/47168 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-crypto-keygen.js')
-rw-r--r--test/parallel/test-crypto-keygen.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-crypto-keygen.js b/test/parallel/test-crypto-keygen.js
index 1a77266b05..df8c5d93a9 100644
--- a/test/parallel/test-crypto-keygen.js
+++ b/test/parallel/test-crypto-keygen.js
@@ -1278,7 +1278,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
}
// Test invalid divisor lengths. (out of range)
- for (const divisorLength of [-6, -9, 2147483648]) {
+ for (const divisorLength of [-1, -6, -9, 2147483648]) {
assert.throws(() => generateKeyPair('dsa', {
modulusLength: 2048,
divisorLength