Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v7.2.1 proposal #10127

Merged
merged 195 commits into from
Dec 6, 2016
Merged
Changes from 1 commit
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
e9c2ffd
deps: backport GYP fix to fix AIX shared suffix
Nov 14, 2016
16af467
build: add shared library support to AIX build
Nov 14, 2016
561b149
tools: allow test.py to use full paths of tests
reconbot Nov 19, 2016
3e5be7f
async_wrap: mode constructor/destructor to .cc
trevnorris Nov 23, 2016
5157a5c
async_wrap: make Initialize a static class member
trevnorris Nov 23, 2016
5379b9d
async_wrap: call destroy() callback in uv_idle_t
trevnorris Nov 23, 2016
44ae028
doc: fix <code> inside stability boxes
silverwind Nov 21, 2016
fc13cc6
test:refactor test-tls-hello-parser-failure
Trott Nov 21, 2016
2fb8257
test: fix flaky test-inspector
Trott Nov 21, 2016
65af114
doc: "util" is not needed to extend ES6 classes
Nov 22, 2016
77e145a
doc: clarify slashes-appending in url module
Trott Nov 22, 2016
a673d44
lib,tools: remove unneeded escaping of /
princejwesley Nov 14, 2016
53d1752
tools: Add no useless regex char class rule
princejwesley Nov 13, 2016
c7cd400
doc: fix crypto "decipher.setAAD()" typo
Amery2010 Nov 24, 2016
a8d84d5
doc: changed order of invocations in https.request() example.
Nov 15, 2016
6297b9a
doc: minor fixes event-loop-timers-and-nexttick.md
dankoster Oct 17, 2016
4971c3b
test: fix flaky test-dgram-empty-packet & friends
Trott Nov 21, 2016
2b7ecb5
test: exclude no_interleaved_stdio test for AIX
mhdawson Nov 23, 2016
80a3934
inspector: /json/version returns object, not array
bnoordhuis Nov 23, 2016
4fa84c9
doc: fix crypto Verify cut-n-paste from Sign
Amery2010 Nov 25, 2016
9554a97
https: name anonymous functions in https
pvsousalima Oct 21, 2016
b763a31
test: refactor test-child-process-exec-error
Trott Nov 24, 2016
2ee3543
tools: remove unneeded escaping in generate.js
Trott Nov 24, 2016
d51c856
test: fix test-http-status-reason-invalid-chars
saitoxu Nov 12, 2016
d31a411
test: fix test-tls-connect-address-family
mkamakura Nov 12, 2016
88464ac
benchmark: reformat code for clarity
Trott Nov 24, 2016
3f1b068
test: refactor common.js
Trott Nov 22, 2016
3b193de
test: fix flaky test-cluster-dgram-2
Trott Nov 24, 2016
d06f010
test: cleanup test-dgram-error-message-address
Goyapa Oct 5, 2016
e0e62d1
Revert "buffer: runtime deprecation of calling Buffer without new"
addaleax Nov 9, 2016
dcba250
test: refactor and fix test-buffer-bytelength
targos Nov 26, 2016
6ab920a
doc: add guide for maintaining V8
ofrobots Nov 24, 2016
5ae549c
url: fix -Warray-bounds warning
santigimeno Nov 22, 2016
cd10e1a
test: refactor and fix test-dns
targos Nov 26, 2016
e2db5c8
test: refactor test-net-pingpong
targos Nov 26, 2016
74c3283
test: fix test-buffer-slow
targos Nov 26, 2016
5c9aa18
constants: errors -> errno
bengl Oct 28, 2016
4d1e112
test: refactor and fix test-crypto
targos Nov 26, 2016
c35bf44
test: refactor test-crypto-binary-default
targos Nov 26, 2016
59aec82
test: refine test-http-status-reason-invalid-chars
Trott Nov 26, 2016
4c2ad8c
test: refactor test-preload
Trott Nov 26, 2016
70633f9
test: refactor test-util-inspect
Trott Nov 26, 2016
2e22fa0
doc: improve description of module `exports`
sam-github Nov 15, 2016
8c70f79
doc: clarify introductory module material
Trott Nov 27, 2016
371090d
build: Make configure file parseable on python3
kalrover Nov 17, 2016
9562391
test: add toASCII and toUnicode punycode tests
claudiorodriguez Nov 22, 2016
0bdd5ca
test: run cpplint on files in test/cctest
bnoordhuis Nov 24, 2016
0ccb2c3
test: refactor test-crypto-timing-safe-equal
targos Nov 29, 2016
c286312
test: replace assert.equal with assert.strictEqual
brad-decker Nov 29, 2016
9099664
repl: fix generator function preprocessing
not-an-aardvark Nov 30, 2016
0e36bec
test: refactor test-fs-non-number-arguments-throw
targos Nov 29, 2016
a0e25b2
doc: remove minor contradiction in debugger doc
Trott Nov 28, 2016
5c15a68
test: refactor test-debug-args
Trott Nov 28, 2016
f6c1f24
doc: update Collaborators list in README
Trott Nov 29, 2016
c948d90
doc: it’s -> its in api/child_process.md
drifkin Dec 2, 2016
3af4ef4
test: use strictEqual in test-debugger-client.js
bencripps Nov 30, 2016
eb369f6
test: use strictEqual in test-zlib-truncated
bencripps Nov 30, 2016
65cda7f
lib: use === in _http_server and _tls_wrap
walterbm Nov 29, 2016
a6377a9
test: increase coverage for lib/events.js
captainsafia Dec 1, 2016
13eea40
doc: rename writing_tests.md to writing-tests.md
captainsafia Dec 1, 2016
a857c9a
test: refactor test-vm-debug-context
makenova Dec 1, 2016
66554c7
test: refactor test-tls-ecdh
stpCollabr8nLstn Dec 1, 2016
f9386f2
test: update net-local-address-port
Dec 1, 2016
0cab6eb
test: test for http.request() invalid method error
ashtonian Dec 1, 2016
cdec174
doc: var => const in js code examples of addons.md
vsemozhetbyt Dec 2, 2016
44d9bc8
test: change equal to strictEqual
kzurawel Dec 1, 2016
78e188d
doc: clarify fs.createReadStream options
WesTyler Dec 1, 2016
d1da899
test: increase coverage for timers
lrlna Dec 1, 2016
c0a2862
test: var -> let/const, .equal -> .strictEqual
shiya Dec 1, 2016
d226418
doc: suggest Buffer.alloc instead of Buffer#fill
not-an-aardvark Dec 1, 2016
2e889cf
test: improve test for crypto pbkdf2
joyeecheung Dec 1, 2016
b4ec7d6
test: use const in test-crypto-pbkdf2
ghvaldez Dec 1, 2016
f9d79ef
test: use assert.strictEqual() cluster test
badhikari-godaddy Dec 1, 2016
4cb52ee
test: update to const iin cluster test
ghvaldez Dec 1, 2016
1f6f411
test: refactor test/parallel/test-fs-write-file.js
kylecarter Dec 1, 2016
87038bb
test: refactor test-fs-write-file
radelmann Dec 1, 2016
070370f
test: refactor test-fs-append-file-sync
ianwhitedeveloper Dec 1, 2016
d2e8927
test: refactor test-fs-append-file-sync
cByst Dec 1, 2016
eb0c1cd
test: refactor test-cluster-setup-master-argv
Dec 1, 2016
4cc813d
test: refactor test-cluster-setup-master-argv
Dec 1, 2016
f76bb2a
test: refactor test for crypto cipher/decipher iv
julianduque Dec 1, 2016
03b1c31
deps: cherry-pick 08377af from v8 upstream
fhinkel Nov 21, 2016
3e37673
test: refactor test-crypto-cipheriv-decipheriv
Dec 1, 2016
371ca03
test: refactor test-vm-static-this.js
dbradf Dec 1, 2016
b73f6b7
test: refactor test-child-process-spawn-error
stokingerl Dec 1, 2016
8f550df
test: refactor child-process-spawn-error
Dec 1, 2016
fb4b650
test: crypto-hash-stream-pipe use strict equal
mitchellst Dec 1, 2016
63fafb8
test: refactor test-crypto-hash-stream-pipe
matt-wilson-cc Dec 1, 2016
dc76a20
test: Updating vars to const and tsl server test
Dec 1, 2016
f3eb8b1
test: refactor test-tls-timeout-server-2
drifkin Dec 1, 2016
13cc6a0
test: var to const/let in test-tls-set-ciphers
rajatkumar Dec 1, 2016
3d35930
test: replace equal with strictEqual
julianduque Dec 1, 2016
57f060c
test: replace equal with strictEqual in crypto
julianduque Dec 1, 2016
295eb5a
test: swap var->const/let and equal->strictEqual
pmasucci Dec 1, 2016
2a8d293
test: Update to const and use regex for assertions
Intregrisist Dec 1, 2016
22b15f2
test: change var to const for require and strict equality checks
harishtejwani Dec 1, 2016
e070588
test: refactor test-child-process-stdio-inherit
WesTyler Dec 1, 2016
55b58ba
test: use assert.strictEqual in test-crypto-ecb
daniel-pittman Dec 1, 2016
cdc2909
test: refactor test-fs-read-stream-inherit.js
Dec 1, 2016
7697aee
test: use strictEqual in cwd-enoent
jdharmon Dec 1, 2016
c4fbdfa
doc: fix typo for `decipher.final`.
iamchenxin Dec 2, 2016
9b9fe8c
test: change var to const in test-tls-key-mismatch.js
bjdelro Dec 1, 2016
c4902e4
test: polish test-net-better-error-messages-listen
digitalinfinity Dec 2, 2016
ea1c4e1
test,url: improve escaping in url.parse
joyeecheung Dec 2, 2016
d87926a
test: assert.equal -> assert.strictEqual
Dec 1, 2016
a34e195
test: refactor test-dgram-exclusive-implicit-bind
cesarhq Dec 1, 2016
baa1acc
test: assert.equal -> assert.strictEqual
Dec 1, 2016
69077a1
test: refactor test-fs-append-file.js
radelmann Dec 4, 2016
3253954
meta: whitelist dotfiles in .gitignore
claudiorodriguez Aug 8, 2016
e1394ee
test: refactor test-tls-friendly-error-message.js
edsadr Dec 1, 2016
a771f21
test: use strictEqual in test-cli-eval-event.js
Dec 1, 2016
38ec8e4
test: improve test for crypto padding
julianduque Dec 1, 2016
36b8dd3
test: refactor test-crypto-padding.js
likhter Dec 1, 2016
14c0388
test: refactor test-tls-server-verify
Dec 1, 2016
cf3c635
test: refactor test-https-truncate
Dec 1, 2016
fd17ca7
test: refactor test-net-dns-custom-lookup
funkent Dec 1, 2016
c456ca3
test: refactor test-tls-destroy-whilst-write
cByst Dec 1, 2016
1eb5817
test: refactor test-vm-syntax-error-stderr.js
Dec 1, 2016
ae2bf0a
test: Changed assert.equal to assert.strictEqual
daniel-pittman Dec 1, 2016
5f3f54d
test: refactor test-http-dns-error
outsideris Dec 1, 2016
f62567b
test: use const instead of var in test-require-json.js
sarahmeyer Dec 1, 2016
ef7cbde
test: changed vars to const in test-net-better-error-messages-listen-…
anoff Dec 1, 2016
65c4483
test: var to const, assert.equal to assert.strictEqual in net
stv8 Dec 1, 2016
9fddf29
test: refactor test-repl-mode.js
cesarhq Dec 1, 2016
da8e3d9
test: refactor test-child-process-constructor
kathytruong Dec 1, 2016
318a2db
test: refactor test-cli-syntax
Dec 1, 2016
6d5ded5
test: refactor test-domain
Dec 1, 2016
278772a
test: refactor dgram-send-multi-buffer-copy
likhter Dec 1, 2016
bca587b
test: refactor test-crypto-certificate
Dec 1, 2016
a801ffb
test: refactor test-console
Dec 1, 2016
6502427
test: refactor test-require-exceptions
Dec 1, 2016
f900753
test: refactor test-crypto-ecb
michael6 Dec 1, 2016
346204d
doc: add link to `net.Server` in tls.md
drifkin Dec 4, 2016
ac8d212
debugger: refactor _debugger.js
Trott Nov 30, 2016
5a2b688
test: updated test-stream-pipe-unpipe-stream
Dec 2, 2016
0c745e3
buffer: convert offset & length to int properly
thefourtheye Nov 27, 2016
6087e36
repl: preprocess only for defaultEval
princejwesley Nov 22, 2016
64854f6
tools: add ESLint rule for assert.throws arguments
targos Nov 26, 2016
4bcda63
deps: upgrade npm to 3.10.10
iarna Nov 21, 2016
cef3a04
promise: better stack traces for --trace-warnings
addaleax Nov 9, 2016
573f9db
buffer: fix transcode for single-byte enc to ucs2
addaleax Nov 29, 2016
fa38032
child_process: name anonymous functions
brad-decker Dec 1, 2016
e502262
test: replace equal with strictEqual in test-freelist.js
edsadr Dec 1, 2016
64b2494
test: updated tls-getcipher test
Ethan-Arrowood Dec 1, 2016
2beba9e
test: refactor test-child-process-double-pipe
kingnebby Dec 1, 2016
dfa35d6
debugger: call `this.resume()` after `this.run()`
lance Dec 2, 2016
d085245
test: strictEqual in test-beforeexit-event.js
CodeTheInternet Dec 1, 2016
c05909b
test: adding strictEqual to test-buffer-indexof.js
ericgonzalez Dec 1, 2016
8b6c45f
test: update tls test to use const/let and common.mustCall
Dec 1, 2016
47b5f9e
test: modernize test-fs-truncate-fd
NigelKibodeaux Dec 1, 2016
6df3b7b
test: update repl tests
makenova Dec 1, 2016
7428d80
test: refactor test-cluster-worker-events
fmizzell Dec 1, 2016
79e6068
test: use strictEqual() domain-http
cdnadmin Dec 1, 2016
e8fc7fc
test: Added more validations to setEncoding
pauljlucas Dec 1, 2016
ae1ef53
test: fix buffer alloc tests
levsoroka Dec 1, 2016
fdc55ef
test: use const or let and assert.strictEqual
crokita Dec 1, 2016
7fd8833
test: update assert.equal() to assert.strictEqual()
Dec 1, 2016
990a19f
test: refactor test for net listen on fd0
julianduque Dec 1, 2016
256de35
test: add test for process.stdin.setRawMode()
Dec 1, 2016
5ad7e04
test: strictCompare and explcit inputs mprovement to test-buffer-slice
Dec 1, 2016
f55a63c
internal/util: move the case 'latin1'
JacksonTian Nov 16, 2016
34b8c86
test: Modernize test-tls-peer-certificate.js
ipotuzhnov Dec 1, 2016
51b77aa
doc: add people to cc for async_wrap
addaleax Nov 4, 2016
b9bd9a2
doc: remove Sam Roberts from release team
sam-github Nov 30, 2016
446bcbe
doc: correct it's vs. its usage
Trott Dec 2, 2016
bb677d4
test: strictEqual() and RegExp in test-buffer-fill.js
jscottchapman Dec 1, 2016
7c90244
test: implemented es6 conventions
ruggertech Dec 3, 2016
cbdc64e
test: test-file-write-stream3.js refactor
Dec 1, 2016
328cd93
test: changed assert.equal to assert.strictEqual
ssmereka Dec 1, 2016
8e27254
test: convert assert.equal to assert.strictEqual
Dec 1, 2016
2e36b2e
test: using const and strictEqual
ftatieze Dec 1, 2016
c0eb08a
test: use strictEqual instead of equal
uttampawar Dec 1, 2016
f68bfc5
test: replace equal with strictEqual
hackygolucky Dec 1, 2016
84813fd
test: refactor test-fs-read-stream-resume
Dec 1, 2016
1877ba3
test: refactor test-fs-symlink-dir-junction
walterbm Dec 1, 2016
ba7d1cf
test: refactor test-require-resolve
blugavere Dec 5, 2016
79b36e9
test: update test-net-connect-handle-econnrefused
itspun Dec 1, 2016
371a785
test: refactor test-signal-unregister
Dec 1, 2016
0a07bcc
test: refactor test-tls-connect-simple
russelltsherman Dec 1, 2016
d697ac4
test: use assert.strictEqual in test-cli-eval
NigelKibodeaux Dec 1, 2016
2f731e5
test: refactor test-child-fork-exec-path.js
hirabhullar Dec 1, 2016
8936d83
test: refactor test-fs-write.js
hirabhullar Dec 1, 2016
a0f6cc7
repl: avoid parsing division operator as regex
not-an-aardvark Dec 3, 2016
843b8c1
test: refactor test-domain-multi
WesTyler Dec 1, 2016
f531c96
test: changed assert.Equal to asset.strictEqual
pchinjr Dec 1, 2016
a3a664a
test: update test-stdout-to-file
Dec 1, 2016
0a4fc64
test: clean up tls junk test
dguo Dec 1, 2016
f5e622e
test: use assert.strictEqual and fix setTimeout
mattcphillips Dec 1, 2016
e718f20
test: refactor test-tls-ocsp-callback
kathytruong Dec 1, 2016
2f6d0c7
test: refactor test-require-extensions-main
darylthayilporch Dec 1, 2016
7144f81
test: add test for url module domainToAscii and domainToUnicode
darylthayilporch Dec 1, 2016
9726c82
test: update parallel/test-crypto-hash.js
Dec 1, 2016
3bc40ce
doc: remove repeated info onboarding.md
BethGriggs Nov 15, 2016
35d2846
2016-12-06, Version 7.2.1 (Current)
Fishrock123 Dec 6, 2016
c2cc11b
Working on v7.2.2
Fishrock123 Dec 6, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: refactor test-crypto-padding.js
- Replaced var with const and let.
- Replaced assert.equal() with assert.strictEqual().
- Added error message checking for assert.throws().

PR-URL: #9971
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
likhter authored and addaleax committed Dec 5, 2016

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
commit 36b8dd3b0732899bb5c362680ffe680393fcab10
26 changes: 12 additions & 14 deletions test/parallel/test-crypto-padding.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';
var common = require('../common');
var assert = require('assert');
const common = require('../common');
const assert = require('assert');

if (!common.hasCrypto) {
common.skip('missing crypto');
return;
}
var crypto = require('crypto');
const crypto = require('crypto');

crypto.DEFAULT_ENCODING = 'buffer';

@@ -21,7 +21,7 @@ const EVEN_LENGTH_PLAIN = 'Hello node world!AbC09876dDeFgHi';
const KEY_PLAIN = 'S3c.r.e.t.K.e.Y!';
const IV_PLAIN = 'blahFizz2011Buzz';

var CIPHER_NAME = 'aes-128-cbc';
const CIPHER_NAME = 'aes-128-cbc';


/*
@@ -31,20 +31,20 @@ var CIPHER_NAME = 'aes-128-cbc';
// echo -n 'Hello node world!' | \
// openssl enc -aes-128-cbc -e -K 5333632e722e652e742e4b2e652e5921 \
// -iv 626c616846697a7a3230313142757a7a | xxd -p -c256
var ODD_LENGTH_ENCRYPTED =
const ODD_LENGTH_ENCRYPTED =
'7f57859550d4d2fdb9806da2a750461a9fe77253cd1cbd4b07beee4e070d561f';

// echo -n 'Hello node world!AbC09876dDeFgHi' | \
// openssl enc -aes-128-cbc -e -K 5333632e722e652e742e4b2e652e5921 \
// -iv 626c616846697a7a3230313142757a7a | xxd -p -c256
var EVEN_LENGTH_ENCRYPTED =
const EVEN_LENGTH_ENCRYPTED =
'7f57859550d4d2fdb9806da2a750461ab46e71b3d78ebe2d9684dfc87f7575b988' +
'6119866912cb8c7bcaf76c5ebc2378';

// echo -n 'Hello node world!AbC09876dDeFgHi' | \
// openssl enc -aes-128-cbc -e -K 5333632e722e652e742e4b2e652e5921 \
// -iv 626c616846697a7a3230313142757a7a -nopad | xxd -p -c256
var EVEN_LENGTH_ENCRYPTED_NOPAD =
const EVEN_LENGTH_ENCRYPTED_NOPAD =
'7f57859550d4d2fdb9806da2a750461ab46e' +
'71b3d78ebe2d9684dfc87f7575b9';

@@ -54,17 +54,17 @@ var EVEN_LENGTH_ENCRYPTED_NOPAD =
*/

function enc(plain, pad) {
var encrypt = crypto.createCipheriv(CIPHER_NAME, KEY_PLAIN, IV_PLAIN);
const encrypt = crypto.createCipheriv(CIPHER_NAME, KEY_PLAIN, IV_PLAIN);
encrypt.setAutoPadding(pad);
var hex = encrypt.update(plain, 'ascii', 'hex');
let hex = encrypt.update(plain, 'ascii', 'hex');
hex += encrypt.final('hex');
return hex;
}

function dec(encd, pad) {
var decrypt = crypto.createDecipheriv(CIPHER_NAME, KEY_PLAIN, IV_PLAIN);
const decrypt = crypto.createDecipheriv(CIPHER_NAME, KEY_PLAIN, IV_PLAIN);
decrypt.setAutoPadding(pad);
var plain = decrypt.update(encd, 'hex');
let plain = decrypt.update(encd, 'hex');
plain += decrypt.final('latin1');
return plain;
}
@@ -104,9 +104,7 @@ assert.doesNotThrow(function() {

assert.throws(function() {
// must have at least 1 byte of padding (PKCS):
assert.strictEqual(
dec(EVEN_LENGTH_ENCRYPTED_NOPAD, true), EVEN_LENGTH_PLAIN
);
assert.strictEqual(dec(EVEN_LENGTH_ENCRYPTED_NOPAD, true), EVEN_LENGTH_PLAIN);
}, /bad decrypt/);

assert.doesNotThrow(function() {