diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-06-30 22:36:10 +0200 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-07-03 12:01:03 -0700 |
commit | 1d7be3253f12c9eafaf0ecec378a657893b30852 (patch) | |
tree | 4bb8792ec68bc92c5056a2d93c6e90414d6efda9 /test/sequential/test-crypto-timing-safe-equal.js | |
parent | 9b8d317d9916dd44b2b3678df05f9daf6eb14c90 (diff) | |
download | node-new-1d7be3253f12c9eafaf0ecec378a657893b30852.tar.gz |
crypto: move typechecking for timingSafeEqual into C++
This makes the function more robust against V8 inlining.
Fixes: https://github.com/nodejs/node/issues/34073
PR-URL: https://github.com/nodejs/node/pull/34141
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Diffstat (limited to 'test/sequential/test-crypto-timing-safe-equal.js')
-rw-r--r-- | test/sequential/test-crypto-timing-safe-equal.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sequential/test-crypto-timing-safe-equal.js b/test/sequential/test-crypto-timing-safe-equal.js index f9709ac966..769b5f7d88 100644 --- a/test/sequential/test-crypto-timing-safe-equal.js +++ b/test/sequential/test-crypto-timing-safe-equal.js @@ -48,7 +48,7 @@ assert.throws( name: 'TypeError', message: 'The "buf1" argument must be an instance of Buffer, TypedArray, or ' + - "DataView. Received type string ('not a buffer')" + 'DataView.' } ); @@ -59,6 +59,6 @@ assert.throws( name: 'TypeError', message: 'The "buf2" argument must be an instance of Buffer, TypedArray, or ' + - "DataView. Received type string ('not a buffer')" + 'DataView.' } ); |