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

Check crypto fix #2

Closed
wants to merge 155 commits into from
Closed

Check crypto fix #2

wants to merge 155 commits into from

Conversation

BridgeAR
Copy link
Owner

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

cjihrig and others added 30 commits March 12, 2019 20:48
Update ESLint to 5.15.0

PR-URL: nodejs#26391
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
This includes an update for chownr from 1.0.1 to 1.1.1, which means a
fix for the issue described in
isaacs/chownr#14. While not a
user-facing issue, it seems like a good idea to patch promptly anyway.

PR-URL: nodejs#26393
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Update lint-md.js from updated rollup modules.

PR-URL: nodejs#26393
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
This change adds a 'msbuild_arg' option to vcbuild.bat that can be used
to pass arbitrary flags to MSBuild.

It also adds a 'binlog' flag as a shortcut 'msbuild_arg' option to
enable binary logging to `%config%\node.binlog`. This is especially
convenient when debugging changes to the build system.

In the process of developing this change, the idea of adding 'setlocal'
to the beginning of the script was rejected since other scripts in this
repo rely on the exported environment variables. This change adds a
note describing this.

PR-URL: nodejs#25994
Reviewed-By: João Reis <[email protected]>
Fixes: nodejs#25808

PR-URL: nodejs#26303
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Clarify how it must behave for both synchronous and asynchronous
completion.

PR-URL: nodejs#26339
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
* standardize on arrow functions for callbacks
* standaradize on trailing commas for multiline arrays

PR-URL: nodejs#26394
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Enable ESLint rules for trailing commas and arrow callbacks in tools
directory. These rules are also in place in the benchmark directory.

PR-URL: nodejs#26394
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
The test_threadsafe_function doesn't seem to be flaky anymore on
Windows. Optimistically removing the flaky designation in the relevant
status file.

Refs: nodejs#23621 (comment)

PR-URL: nodejs#26403
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
The support matrix was out of date. Update
with current status.

Fixes: nodejs#25801

PR-URL: nodejs#26377
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Use a `v8::Object` with an internal field, rather than a
`v8::External`.

On a `GetReturnValue().Set(Environment::GetCurrent(args) == nullptr)`
noop function, this benchmarks as a ~60 % speedup, as calls to
`obj->GetAlignedPointerFromInternalField()` can be inlined and
the field is stored with one level of indirection less.

This also makes breaking up some pieces of the `Environment` class
into per-native-binding data easier, if we want to pursue that path
in the future.

PR-URL: nodejs#26382
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
So far the benchmarks created a highly specialized function which
would inline exactly to the input. This changes it to provide a
more realistic view to actual input by changing the input on each
iteration. That prevents the function to be to specific.

It also reduces the number of iterations the benchmarks are run to
reduce the overall runtime. A microbenchmark should already show a
significant difference with lower iterations, otherwise the
significance for real world applications is only limited.

PR-URL: nodejs#26359
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#26318
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: nodejs#26310
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: nodejs#26284
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: nodejs#26275
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#25818
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
In `_tls_wrap.js` while calling `socket.connect` the `localPort` was
missing, restore it.

PR-URL: nodejs#24554
Fixes: nodejs#24543
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#26396
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: nodejs#26365
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: nodejs#26354
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
PR-URL: nodejs#26336
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: James M Snell <[email protected]>
This commit adds support for the resourceUsage report section
on Windows by using uv_getrusage() instead of getrusage().

PR-URL: nodejs#26406
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
This reverts commit f395a4a.

As of openssl-1.1.1b, the dot-files are no longer distributed, so this
is no longer necessary.

PR-URL: nodejs#26327
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
This updates all sources in deps/openssl/openssl with openssl-1.1.1b.

PR-URL: nodejs#26327
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
`cd deps/openssl/config; make` updates all archs dependant files.

PR-URL: nodejs#26327
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
danbev and others added 28 commits March 14, 2019 11:02
Currently, the following compiler warnings is generated:

../test_string.c:235:50: warning:
incompatible pointer types passing 'char [1]' to parameter of type
'const char16_t *' (aka 'const unsigned short *')
[-Wincompatible-pointer-types]
NAPI_CALL(env, napi_create_string_utf16(env,
    "", ((size_t)INT_MAX) + 1, &output));
    ^~
../../common.h:50:23: note: expanded from macro 'NAPI_CALL'
  NAPI_CALL_BASE(env, the_call, NULL)
                      ^~~~~~~~
../../common.h:42:10: note: expanded from macro 'NAPI_CALL_BASE'
    if ((the_call) != napi_ok) {                               \
         ^~~~~~~~
/node/src/js_native_api.h:80:66: note:
passing argument to parameter 'str' here const char16_t* str,
                                                         ^
1 warning generated.

This commit adds a cast to silence this warning.

PR-URL: nodejs#26539
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
These were causing compilation warnings.

PR-URL: nodejs#26590
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Destroy the `Worker` class earlier, because we don’t need access
to it once the thread has stopped and all resources have been
cleaned up.

PR-URL: nodejs#26542
Fixes: nodejs#26535
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#26538
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#26547
Refs: nodejs#26546
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Fixes a bug I introduced in 9613221

PR-URL: nodejs#26570
Refs: nodejs#25870
Refs: nodejs#26473
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
The ecosystem broke by making it non-writable, so this is a good
intermediate fix.

PR-URL: nodejs#26488
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#24346
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
If this file is loaded with Node.js build without ssl, it will load
'node-inspect/lib/internal/inspect_client' as well. Due to that two
deprecation warnings will be emitted instead of one and the test
fails.

It should be safe to just test all other cases and to ignore this
specific file.

PR-URL: nodejs#26619
Fixes: nodejs#26480
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
HTTP/1.1 mandates connections which do not support keep-alive and
close the connection send the connection: close header, see
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.10

This page also provides more information:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection

I understand that HTTP/1.1 defaults to keep-alive - and that the
Connection: close header is required when closing a connection.

This adds the Connection: close header in the 400 responses
sent on client errors.

PR-URL: nodejs#26467
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#26306
Reviewed-By: Gireesh Punathil <[email protected]>
THIS COMMIT SHOULD GO WITH THE NEXT. IT WILL FIND NEW LINT.

PR-URL: nodejs#26306
Reviewed-By: Gireesh Punathil <[email protected]>
PR-URL: nodejs#25685
Reviewed-By: Bradley Farias <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Use a common `kHandle` for all `StreamBase`-based streams.

PR-URL: nodejs#26491
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
sendTrilers => sendTrailers.

PR-URL: nodejs#26616
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
In particular, this comes into play in the node repl, which apparently
enables domains by default. Whenever any Promise gets inspected, a
`.domain` property is displayed, which is *very confusing*, especially
since it has some kind of WeakReference attached to it, which is not yet
a language feature.

This change will prevent it from showing up in casual inspection, but
will leave it available for use.

PR-URL: nodejs#26210
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
PR-URL: nodejs#26566
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#26565
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
PR-URL: nodejs#26560
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#26545
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
The `setUnrefTimeout` function is never called with more arguments
than two. So quite some code was dead and never used. This removes
that code and simplifies the args check not to coerce objects to
booleans.

PR-URL: nodejs#26555
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Calling `response.end(data)` is not 100% equivalent to calling
`response.write(data)` followed by `response.end()`.

PR-URL: nodejs#26465
Fixes: nodejs#26005
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
PR-URL: nodejs#26494
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#26496
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
PR-URL: nodejs#26496
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
PR-URL: nodejs#26496
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
This improves our custom eslint rules to detect assertions to detect
assertions with only a single argument and fixes false negatives in
case unary expressions are used.
Some rules were extended to also lint our docs and tools and the lib
rule was simplified to prohibit most assertion calls.

PR-URL: nodejs#26569
Refs: nodejs#26565
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Notable Changes

* bootstrap:
  * Add experimental `--frozen-intrinsics` flag (Guy Bedford)
    nodejs#25685
* build:
  * Enable v8's siphash for hash seed creation (Rod Vagg)
    nodejs#26367
* deps:
  * Upgrade openssl to 1.1.1b (Sam Roberts)
    nodejs#26327
* process:
  * Make `process[Symbol.toStringTag]` writable again
    (Ruben Bridgewater) nodejs#26488
* repl:
  * Add `util.inspect.replDefaults` to customize the writer
    (Ruben Bridgewater) nodejs#26375
* report:
  * Rename `triggerReport()` to `writeReport()` (Colin Ihrig)
    nodejs#26527
@BridgeAR BridgeAR closed this Jan 20, 2020
@BridgeAR BridgeAR deleted the check-crypto-fix branch January 20, 2020 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.