summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2019-03-26 12:16:30 +0100
committerTobias Nießen <tniessen@tnie.de>2019-03-28 14:33:03 +0100
commitc35acc0260b48dc4c656014ef665d811bdd02aa6 (patch)
treeba6794e415ad2d2c8d76b63c0c47a5b55b645815 /test
parentd4eda4d876125081f0245dfb0222eeb59805c260 (diff)
downloadandroid-node-v8-c35acc0260b48dc4c656014ef665d811bdd02aa6.tar.gz
android-node-v8-c35acc0260b48dc4c656014ef665d811bdd02aa6.tar.bz2
android-node-v8-c35acc0260b48dc4c656014ef665d811bdd02aa6.zip
crypto: allow undefined for saltLength and padding
PR-URL: https://github.com/nodejs/node/pull/26921 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-crypto-sign-verify.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js
index ca7f2986e1..e0b0d3fd7b 100644
--- a/test/parallel/test-crypto-sign-verify.js
+++ b/test/parallel/test-crypto-sign-verify.js
@@ -32,23 +32,23 @@ const modSize = 1024;
common.expectsError(
() => crypto.createVerify('SHA256').verify({
key: certPem,
- padding: undefined,
+ padding: null,
}, ''),
{
code: 'ERR_INVALID_OPT_VALUE',
type: TypeError,
- message: 'The value "undefined" is invalid for option "padding"'
+ message: 'The value "null" is invalid for option "padding"'
});
common.expectsError(
() => crypto.createVerify('SHA256').verify({
key: certPem,
- saltLength: undefined,
+ saltLength: null,
}, ''),
{
code: 'ERR_INVALID_OPT_VALUE',
type: TypeError,
- message: 'The value "undefined" is invalid for option "saltLength"'
+ message: 'The value "null" is invalid for option "saltLength"'
});
// Test signing and verifying
@@ -233,7 +233,7 @@ common.expectsError(
// Test exceptions for invalid `padding` and `saltLength` values
{
- [null, undefined, NaN, 'boom', {}, [], true, false]
+ [null, NaN, 'boom', {}, [], true, false]
.forEach((invalidValue) => {
common.expectsError(() => {
crypto.createSign('SHA256')