0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

21848 Commits

Author SHA1 Message Date
Vse Mozhet Byt
b3bff41690 doc, tools: make type parsing more strict
PR-URL: https://github.com/nodejs/node/pull/19881
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-11 14:11:29 +03:00
Luigi Pinca
96e82beac3 test: fix test-http-dump-req-when-res-ends
Fix test-http-dump-req-when-res-ends and move it back to test/parallel/

PR-URL: https://github.com/nodejs/node/pull/19866
Refs: https://github.com/nodejs/node/pull/19823
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-04-11 09:30:02 +02:00
Pieter Mees
2852521c49 http2: emit session connect on next tick
PR-URL: https://github.com/nodejs/node/pull/19842
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-04-11 08:57:54 +02:00
Pieter Mees
f64aaba725 doc: add Http2Session.connecting property
PR-URL: https://github.com/nodejs/node/pull/19842
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-04-11 08:57:08 +02:00
Daniel Bevenius
4ac7753e4d test: move require('http2') after crypto check
This test currently fails when configured --without-ssl:
Error [ERR_NO_CRYPTO]:
Node.js is not compiled with OpenSSL crypto support

This commit moves the require of http2 to come after the crypto check to
avoid the error.

PR-URL: https://github.com/nodejs/node/pull/19907
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-11 08:23:08 +02:00
Daniel Bevenius
398968297a test: add check for root user
Currently this test fails if run as the root user:
Mismatched innerFn function calls. Expected exactly 62, actual 42.

The motivation for this is that when building node in a docker
container it is convenient to be able to build as root.

PR-URL: https://github.com/nodejs/node/pull/19850
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-04-11 08:15:14 +02:00
Timothy Gu
42d8976dff
buffer: do not emit deprecation notice on Buffer.of
PR-URL: https://github.com/nodejs/node/pull/19682
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 21:37:57 -07:00
Timothy Gu
d1af1e4e59
buffer: removed unneeded FastBuffer constructor
PR-URL: https://github.com/nodejs/node/pull/19684
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-10 21:34:34 -07:00
cjihrig
dfea13a168
test: verify inspector help url works
This commit adds basic functionality testing of the
help URL printed when the inspector starts.

PR-URL: https://github.com/nodejs/node/pull/19887
Refs: https://github.com/nodejs/node/pull/19871
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-10 15:42:32 -04:00
Jesse Gorzinski
8170f4f463 build: add support for IBM i platform
PR-URL: https://github.com/nodejs/node/pull/19667
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-10 10:56:46 -04:00
Vse Mozhet Byt
5e6817261c doc: prevent a false-positive linkification
PR-URL: https://github.com/nodejs/node/pull/19913
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-10 16:54:24 +03:00
Luigi Pinca
fa2d43bd3e url: make urlToOptions() handle IPv6 literals
Strip the enclosing square brackets from the parsed hostname.

PR-URL: https://github.com/nodejs/node/pull/19720
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 09:05:20 +02:00
juggernaut451
d1156da815
test: refactor parallel/test-tls-async-cb-after-socket-end
PR-URL: https://github.com/nodejs/node/pull/18985
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 01:52:27 +02:00
juggernaut451
cbc7eb7eec
test: refactor parallel/test-tls-cert-chains-concat
Added common.mustCall and replaced function with arrow function.

PR-URL: https://github.com/nodejs/node/pull/19096
Fixes: https://github.com/nodejs/node/issues/14544
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-04-10 01:47:06 +02:00
Nick Filatov
f3e107aeef
src: add punctuation in --inspector doc url message
PR-URL: https://github.com/nodejs/node/pull/19871
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-04-10 01:28:02 +02:00
Kohei Hiraga
6e2d5af0e4
fs: fix missing 'error' event in (Read|Write)Stream#destroy
fs.ReadStream / fs.WriteStream destroy([error]) function
should emit 'error' event if `error` is set.

PR-URL: https://github.com/nodejs/node/pull/19735
Fixes: https://github.com/nodejs/node/issues/19727
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 01:16:42 +02:00
Ruben Bridgewater
9c06770443
assert: lazy load acorn
This makes sure acorn is only loaded in case it is necessary.

PR-URL: https://github.com/nodejs/node/pull/19863
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-10 01:10:12 +02:00
Ruben Bridgewater
252eb2deb2
assert: fix error message
`assert.throws` also accepts objects and errors as input. This fixes
the error message accodingly.

PR-URL: https://github.com/nodejs/node/pull/19865
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-10 01:09:02 +02:00
Joyee Cheung
362694401f
src: rename ERR_STRING_TOO_LARGE to ERR_STRING_TOO_LONG
The old error name and message were trying to be consistent with
ERR_BUFFER_TOO_LARGE but they were not really accurate.
The kStringMaxLength was measured in number of characters,
not number of bytes. The name ERR_STRING_TOO_LARGE also
seems a bit awkward. This patch tries to correct them before
they get released to users.

PR-URL: https://github.com/nodejs/node/pull/19864
Refs: https://github.com/nodejs/node/pull/19739
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-04-10 01:08:10 +02:00
Santiago Gimeno
5b8c62c60d
test: fix flaky http-client-timeout-agent
Close the connection immediately after receiving the `end` event to
avoid that the `timeout` event is fired before the connection closes
gracefully.
Move the test back to parallel.

PR-URL: https://github.com/nodejs/node/pull/19856
Fixes: https://github.com/nodejs/node/issues/19804
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-04-10 01:05:41 +02:00
Ryusei Yamaguchi
87880466b1
doc: fix about decodeStrings property of stream.Writable
This fixes negation ommitted in a former commit.
It also simplifies the text in general.

PR-URL: https://github.com/nodejs/node/pull/19752
Refs: 80ea0c5a64
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 00:59:16 +02:00
Anand Suresh
7bc5151d5e
zlib: fix windowBits validation to allow 0 for decompression mode
From the zlib v1.2.11 manual:

> ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
>                                      int  windowBits));
>
> ...
> windowBits can also be zero to request that inflate use the window
> size in the zlib header of the compressed stream.

The current validation of windowBits in zlib.js doesn't check for this
case.

PR-URL: https://github.com/nodejs/node/pull/19686
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-10 00:56:10 +02:00
Ben Noordhuis
a6db6404ff
deps: cherry-pick b767cde1e7 from upstream V8
Original commit message:

    [intl] unbreak build with ICU 57

    Remove a call to `icu::toUCharPtr()` that wasn't present in other
    similar looking call sites either, just reinterpret_cast directly.

    Fixes https://github.com/nodejs/node/issues/19656.

    Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
    Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3
    Reviewed-on: https://chromium-review.googlesource.com/987953
    Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
    Commit-Queue: Ben Noordhuis <info@bnoordhuis.nl>
    Cr-Commit-Position: refs/heads/master@{#52311}

PR-URL: https://github.com/nodejs/node/pull/19710
Fixes: https://github.com/nodejs/node/issues/19656
Refs: b767cde1e7
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-10 00:53:20 +02:00
Sergey Golovin
a892d9a0c1
url: use existing handlers instead of duplicated code
PR-URL: https://github.com/nodejs/node/pull/19267
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 00:48:42 +02:00
Zhenzhen Zhan
b34a1e1785
module: fix e.stack error when throwing undefined or null
Adds a test for module loading when throwing undefined or null.

PR-URL: https://github.com/nodejs/node/pull/19282
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-04-10 00:47:12 +02:00
Anna Henningsen
9d4ab90117
buffer: do deprecation warning outside node_modules
In addition to `--pending-deprecation`, emit a deprecation warning
for usage of the `Buffer()` constructor for call sites that are outside
of `node_modules`.

The goal of this is to better target developers, rather than
burdening users with an omnipresent and quickly ignored warning.

This implements the result of a TSC meeting discussion
from March 22, 2018.

PR-URL: https://github.com/nodejs/node/pull/19524
Refs: https://github.com/nodejs/node/issues/19079#issuecomment-375121443
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-04-10 00:43:41 +02:00
juggernaut451
e048b15523
test: refactor parallel/test-tls-delayed-attach
test: refactor parallel/test-tls-delayed-attach

Added description to the test, replace function with arrow function and
implemented common.mustCall

PR-URL: https://github.com/nodejs/node/pull/19421
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 00:41:39 +02:00
Anna Henningsen
49fd9c63d2
zlib: use .bytesWritten instead of .bytesRead
The introduction of `.bytesRead` to zlib streams was unfortunate,
because other streams in Node.js core use the exact opposite naming
of `.bytesRead` and `.bytesWritten`.

While one could see how the original naming makes sense in
a `Transform` stream context, we should try to work towards more
consistent APIs in core for these things.

This introduces `zlib.bytesWritten` and documentation-only deprecates
`zlib.bytesRead`.

PR-URL: https://github.com/nodejs/node/pull/19414
Refs: https://github.com/nodejs/node/issues/8874
Refs: https://github.com/nodejs/node/pull/13088
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 00:36:26 +02:00
Benjamin Gruenbaum
cc6abc6e84
url: fix error type
Currently whatwg URLs fail with an incorrect error when null is
passed as the base. Adding a check before accessing a symbol
for the URL makes the URL error correctly. Add test for it.

PR-URL: https://github.com/nodejs/node/pull/19299
Fixes: https://github.com/nodejs/node/issues/19254
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-10 00:27:09 +02:00
juggernaut451
b80da63b99
benchmark: changed millions and thousands to n
PR-URL: https://github.com/nodejs/node/pull/18917
Fixes: https://github.com/nodejs/node/issues/18778
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-04-10 00:22:33 +02:00
Rich Trott
28e5c462d4 doc: improve buf.indexOf() documentation style
* improve usage of "coerce" in buffer.md
* reduce informal tone in buffer.md
* wrap line at 80 characters in buffer.md
* wrap value in backtick for consistency

PR-URL: https://github.com/nodejs/node/pull/19861
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-04-09 15:20:03 -07:00
João Reis
eec659c138 build, tools, win: add nasm detection for OpenSSL
OpenSSL-1.1.0 requires the nasm assembler for building asm files on
Windows. This finds nasm at \Program Files\NASM\nasm.exe or
\ProgramFiles(x86)\NASM\nasm.exe in vcbuild.bat for users who did not
add its path in their enviroments.

Fixes: https://github.com/nodejs/build/issues/1190
Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:45 +09:00
Shigeki Ohtsu
ae096ba27c doc: fix API descriptions for OpenSSL-1.1.0
Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:45 +09:00
Shigeki Ohtsu
970ce14f61 crypto: remove deperecated methods of TLS version
All version-specific methods were deprecated in OpenSSL 1.1.0 and
min/max versions explicitly need to be set.
This still keeps comptatible with JS and OpenSSL-1.0.2 APIs for now.

crypto, constants: add constant of OpenSSL-1.1.0

Several constants for OpenSSL-1.1.0 engine were removed and renamed in
OpenSSL-1.1.0. This added one renamed constant in order to have a
compatible feature with that of OpenSSL-1.0.2.
Other missed or new constants in OpenSSL-1.1.0 are not yet added.

crypto,tls,constants: remove OpenSSL1.0.2 support

This is semver-majar change so that we need not to have
compatibilities with older versions.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:45 +09:00
Shigeki Ohtsu
2b235830fb tools: install all header files OpenSSL-1.1.0
After upgrading OpenSSL-1.1.0, header files depends on architectures
were changed. This fixes to copy all `deps/openssl/config/*.h' into
the install directory.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:45 +09:00
Shigeki Ohtsu
425c5ca27d test: remove openssl -no_rand_screen opts
This option was made from the floating patch of d269e07.
It is no longer needed because the issue was resolved in
OpenSSL-1.1.0.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:45 +09:00
Shigeki Ohtsu
08af7dba2a build: add OpenSSL-1.1.0 support
- For Windows, nasm is new build requirements and openssl_no_asm is
  set to 1 with warning if it is not installed.
- For use of openssl assemble codes, either gas_version >= 2.23,
  xcode_version >= 5.0 ,llvm_version >= 3.3 or nasm_version >= 2.10 is
  needed. Otherwise, openssl_no_asm is set to 1 with warning.
- FIPS is not supported in OpenSSL-1.1.0 so that it leads an error
  when openssl_fips options is enabled in configure.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:45 +09:00
Shigeki Ohtsu
7812ec735b deps: update archs files for OpenSSL-1.1.0
`cd deps/openssl/config; make` updates all archs dependant files.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:44 +09:00
Shigeki Ohtsu
99eb744842 deps: add gyp, header and Makefile for openssl110
This commit has a new binding scheme in builing OpenSSL-1.1.0 library
with Node. OpenSSL-1.1.0 uses a new build system with perl for various
supported platforms. See `Configurations/README` and
`Configurations/README.design` in the OpenSSL source for details.

In order to build OpenSSL library without perl in the build of Node
for various supported platforms, platform dependent files (e.g. asm
and header files ) are pre-generated and stored into the `config/arch`
directory.

- Makefile and generate_gypi.pl
Makefile has supported platform list and generates and copies platform
dependent files (e.g. asm files) into arch directory with
generate_gypi.pl. Platform dependent gypi files also created obtaining
build information from `configdata.pm` that is generated with
`Configure` in the OpenSSL build system.

For Windows, `Configure` generates makefile that is only available to
nmake command.  Since nmake is not supported in Linux,
`Makefile_VC-WIN32` and `Makefile_VC-WIN64A` are made created by hand
for the use of GNU make. If make rules or targets are changed in the
version up of OpenSSL, they should be also updated.

The following files are used in upgrading openssl-1.1.0.

- gyp and gypi files
openssl.gyp has two targets of openssl and openssl-cli referred from
node.gyp. They includes asm and no_asm gypi files with arch dependent
gypi according to its build options and platforms . The gyp data which
is common with asm and no_asm are stored in openssl_common.gypi.

- header files
bn_conf.h, dso_conf.h and opensslconf.h are platform dependent in the
OpenSSL sources. They are replaced with *.h.tmpl files to include the
file in the `../../../config/` and referred to each arch files that
depends on asm and no-asm option.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:44 +09:00
Shigeki Ohtsu
1bcb6c0d26 deps: add s390 asm rules for OpenSSL-1.1.0
This is a floating patch against OpenSSL-1.1.0 to generate asm files
with Makefile rules and it is to be submitted to the upstream.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:43 +09:00
Shigeki Ohtsu
6bab3c23b1 deps: delete files of OpenSSL-1.0.2
They are no longer necessary.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:43 +09:00
Shigeki Ohtsu
66cb29e646 deps: upgrade openssl sources to 1.1.0h
This updates all sources in deps/openssl/openssl with openssl-1.1.0h.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-04-10 06:45:42 +09:00
erwinwahyura
38c97f5dc7
doc: fix punctuation in doc/releases.md
PR-URL: https://github.com/nodejs/node/pull/19774
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-09 23:22:20 +02:00
nodeav
51c2c51029 doc: explain edge case when assigning port to url
numbers which are coerced to scientific notation via .toString(),
will behave unexpectedly when assigned to a url's port.

Fixes: https://github.com/nodejs/node/issues/19595

PR-URL: https://github.com/nodejs/node/pull/19645
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-09 12:25:00 -07:00
Daniel Bevenius
3650972bfb
src: remove unused util.h from tls_wrap.h
This commit removes util.h from tls_wrap.h and adds util-inl.h to
tls_wrap.cc which does use it.

PR-URL: https://github.com/nodejs/node/pull/19849
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-09 16:37:12 +02:00
Tobias Nießen
99c77dc018
doc: improve CCM example
The nonce must be transmitted along with ciphertext and tag.

PR-URL: https://github.com/nodejs/node/pull/19851
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-04-09 16:32:12 +02:00
Vse Mozhet Byt
dff214153f doc: specify definite Array types
Replace `{Array}` with `{type[]}`.

PR-URL: https://github.com/nodejs/node/pull/19895
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-09 17:04:48 +03:00
Vse Mozhet Byt
321c178faa doc: add missing quotes in default string values
PR-URL: https://github.com/nodejs/node/pull/19894
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-09 17:01:29 +03:00
davidmarkclements
ef07d6570f errors: change ERR_HTTP2_HEADER_SINGLE_VALUE to TypeError
changes the base instance for ERR_HTTP2_HEADER_SINGLE_VALUE
from Error to TypeError as a more accurate representation
of the error. Additionally corrects the grammar of the error
message.

PR-URL: https://github.com/nodejs/node/pull/19805
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-04-09 13:29:48 +02:00
davidmarkclements
add1c02bda errors: alter ERR_HTTP2_INVALID_PSEUDOHEADER
changes the base instance for ERR_HTTP2_INVALID_PSEUDOHEADER
from Error to TypeError as a more accurate representation
of the error.

PR-URL: https://github.com/nodejs/node/pull/19808
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-04-09 13:05:35 +02:00