Fedor Indutny
0f68377f69
crypto: support FIPS mode of OpenSSL
...
Support building and running with FIPS-compliant OpenSSL. The process is
following:
1. Download and verify `openssl-fips-x.x.x.tar.gz` from
https://www.openssl.org/source/
2. Extract source to `openssl-fips` folder
3. ``cd openssl-fips && ./config fipscanisterbuild --prefix=`pwd`/out``
(NOTE: On OS X, you may want to run
``./Configure darwin64-x86_64-cc --prefix=`pwd`/out`` if you are going to
build x64-mode io.js)
4. `make -j && make install`
5. Get into io.js checkout folder
6. `./configure --openssl-fips=/path/to/openssl-fips/out`
7. Build io.js with `make -j`
8. Verify with `node -p "process.versions.openssl"` (`1.0.2a-fips`)
Fix: https://github.com/joyent/node/issues/25463
PR-URL: https://github.com/nodejs/io.js/pull/1890
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2015-06-11 01:49:20 +02:00
Sakthipriyan Vairamani
53a4eb3198
fs: make SyncWriteStream non-enumerable
...
Make SyncWriteStream non-enumerable since it's only for internal use.
PR-URL: https://github.com/nodejs/io.js/pull/1870
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-10 16:58:45 -06:00
Sakthipriyan Vairamani
a011c3243f
fs: minor refactoring
...
1. Remove a few unnecessary variables to reduce LoC.
2. Remove redundant `var` definitions of variables in same function.
3. Refactor variables which are defined inside a block and used outside
as well.
4. Refactor effect-less code.
5. In `rethrow` function, instead of assigning to `err` and throwing
`err` directly throw `backtrace` object.
6. Reassign a defined parameter while also mentioning arguments in the
body is one of the optimization killers. So, changing `callback` to
`callback_` and declaring a new variable called `callback` in the body.
PR-URL: https://github.com/nodejs/io.js/pull/1870
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-10 16:56:25 -06:00
Sakthipriyan Vairamani
8841132f30
fs: remove inStatWatchers and use Map for lookup
...
Remove `inStatWatchers` function and make `statWatchers` a `Map`.
PR-URL: https://github.com/nodejs/io.js/pull/1870
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-10 16:55:27 -06:00
Sakthipriyan Vairamani
67a11b9bcc
fs: removing unnecessary nullCheckCallNT
...
`nullCheckCallNT()` function is not necessary, as we can directly pass
`callback` and `er` to `process.nextTick()`.
PR-URL: https://github.com/nodejs/io.js/pull/1870
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-10 16:54:26 -06:00
Sakthipriyan Vairamani
09f2a67bd8
fs: improve error message descriptions
...
1. Change "Bad arguments" error messages to a more helpful message
"options should either be an object or a string".
2. Make braces consistent.
3. Return meaningful error message from fs_event_wrap's
FSEvent's Start function.
PR-URL: https://github.com/nodejs/io.js/pull/1870
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-10 16:51:46 -06:00
Domenic Denicola
cf5020fc02
doc: add domenic as collaborator
...
PR-URL: https://github.com/nodejs/io.js/pull/1942
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-10 16:29:15 -04:00
Oleg Elifantiev
11ed5f31ab
doc: add Olegas as collaborator
...
PR-URL: https://github.com/nodejs/io.js/pull/1930
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Christian Tellnes <christian@tellnes.no >
2015-06-10 22:23:25 +03:00
Bert Belder
91d0a8b19c
win,node-gyp: enable delay-load hook by default
...
The delay-load hook allows node.exe/iojs.exe to be renamed. See efadffe
for more background.
PR-URL: https://github.com/iojs/io.js/pull/1433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-10 09:20:45 -07:00
cjihrig
2dc819b09a
deps: make node-gyp work with io.js
...
Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e ,
5de334c230 , and
da730c76e9 . This commit squashes
them into a single commit.
PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-10 09:20:44 -07:00
Kat Marchán
f41b7f12b5
deps: upgrade to npm 2.11.1
...
PR-URL: https://github.com/nodejs/io.js/pull/1899
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Forrest L Norvell <forrest@npmjs.com >
2015-06-10 09:05:54 -07:00
Ali Ijaz Sheikh
f500e1833b
doc: add ofrobots as collaborator
...
PR-URL: nodejs#1928
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-06-09 15:32:46 -07:00
Christopher Monsanto
717724611a
doc: add monsanto as collaborator
...
PR-URL: https://github.com/nodejs/io.js/pull/1932
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
2015-06-09 18:21:31 -04:00
Alex Kocharin
7192b6688c
doc: add rlidwka as collaborator
...
PR-URL: https://github.com/nodejs/io.js/pull/1929
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-06-10 00:31:39 +03:00
Roman Reiss
9f3a03f0d4
doc: add references to crypto.getCurves()
...
This adds references to the newly available crypto.getCurves method
where appropriate.
PR-URL: https://github.com/nodejs/io.js/pull/1918
Reviewed-By: Brian White <mscdex@mscdex.net >
2015-06-09 22:17:55 +02:00
Oleg Elifantiev
9c0a1b8cfc
cluster: wait on servers closing before disconnect
...
Before this, cluster behaves not the way it is documented. When
disconnect is triggered, worker must wait for every server is closed
before doing disconnect actually.
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
PR-URL: https://github.com/nodejs/io.js/pull/1400
Fixes: https://github.com/nodejs/io.js/issues/1305
2015-06-09 10:41:38 -07:00
Rich Trott
d9ddd7d345
test: remove TODO comment
...
The comment suggests adding randomness to the test suite.
PR-URL: https://github.com/nodejs/io.js/pull/1820
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
2015-06-08 20:19:32 -07:00
Brian White
38d1afc24d
crypto: add getCurves() to get supported ECs
...
PR-URL: https://github.com/nodejs/io.js/pull/1914
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-08 12:35:41 -04:00
Rich Trott
ff39ecb914
doc: remove comma splice
...
Remove comma splice. Edit for clarity and concision.
PR-URL: https://github.com/nodejs/io.js/pull/1900
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com >
2015-06-07 22:25:24 +02:00
Ryan Petschek
deb8b87dc9
doc: add note about available ECC curves
...
Added instructions on how to get the elliptic curves supported by the
OpenSSL installation in the crypto.createECDH() constructor. Also made
a few minor grammar fixes within the same paragraph.
PR-URL: https://github.com/nodejs/io.js/pull/1913
Reviewed-By: Roman Reiss <me@silverwind.io >
2015-06-07 20:47:55 +02:00
Rich Trott
4b3d493c4b
readline: allow tabs in input
...
If tab completion is not being used, allow user to enter tab
characters.
PR-URL: https://github.com/nodejs/io.js/pull/1761
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
2015-06-06 13:11:19 -07:00
cjihrig
6e78e5feaa
os: add homedir()
...
os.homedir() calls libuv's uv_os_homedir() to retrieve the current
user's home directory.
PR-URL: https://github.com/nodejs/io.js/pull/1791
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rod Vagg <rod@vagg.org >
2015-06-05 22:58:14 -04:00
Kat Marchán
02c345020a
gitignore: don't ignore the debug npm module
...
On case insensitive platforms, the rule was catching the debug module
under npm and eslint.
See: https://github.com/nodejs/io.js/pull/1899#issuecomment-109475863
PR-URL: https://github.com/nodejs/io.js/pull/1908
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-06-05 19:47:51 -04:00
Saúl Ibarra Corretgé
a5bd466440
deps: update libuv to version 1.6.1
...
PR-URL: https://github.com/nodejs/io.js/pull/1905
Refs: https://github.com/nodejs/io.js/pull/1791
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-06-05 22:12:49 +02:00
Vladimir Kurchatkin
2dcef83b5f
fs: use kMaxLength from binding
...
This allows `graceful-fs` to evaluate `fs` source
without access to internals.
This is a temporary workaround that makes npm work.
See: https://github.com/isaacs/node-graceful-fs/issues/41
Fixes: https://github.com/nodejs/io.js/issues/1898
PR-URL: https://github.com/nodejs/io.js/pull/1903
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-05 14:40:41 +03:00
Jackson Tian
81029c639a
debugger: improve ESRCH error message
...
When using `iojs debug -p <pid>` with an invalid pid, the debugger
printed an internal error message because it wasn't smart enough
to figure out that the target process didn't exist. Now it is.
PR-URL: https://github.com/nodejs/io.js/pull/1863
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com >
2015-06-05 05:54:19 +02:00
Yosuke Furukawa
353e26e3c7
fs: Add string encoding option for Stream method
...
Add string encoding option for fs.createReadStream and
fs.createWriteStream. and check argument type more strictly
PR-URL: https://github.com/nodejs/io.js/pull/1845
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-06-05 10:30:32 +09:00
Fedor Indutny
59d9734e21
tls_wrap: invoke queued callbacks in DestroySSL
...
PR-URL: https://github.com/nodejs/io.js/pull/1702
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-04 23:38:30 +02:00
Fedor Indutny
75930bb38c
tls: prevent use-after-free
...
* Destroy `SSL*` and friends on a next tick to make sure that we are not
doing it in one of the OpenSSL callbacks
* Add more checks to the C++ methods that might be invoked during
destructor's pending queue cleanup
Fix: https://github.com/joyent/node/issues/8780
Fix: https://github.com/iojs/io.js/issues/1696
PR-URL: https://github.com/nodejs/io.js/pull/1702
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-04 23:38:26 +02:00
Fedor Indutny
5795e835a1
tls: emit errors on close whilst async action
...
When loading session, OCSP response, SNI, always check that the
`self._handle` is present. If it is not - the socket was closed - and we
should emit the error instead of throwing an uncaught exception.
Fix: https://github.com/joyent/node/issues/8780
Fix: https://github.com/iojs/io.js/issues/1696
PR-URL: https://github.com/nodejs/io.js/pull/1702
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-04 23:38:06 +02:00
Vladimir Kurchatkin
6d95f4ff92
smalloc: deprecate whole module
...
It makes no sense to allow people use constants from
`smalloc`, since it will be removed completely eventually.
PR-URL: https://github.com/nodejs/io.js/pull/1822
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-04 11:00:19 +03:00
Vladimir Kurchatkin
628845b816
util: introduce printDeprecationMessage function
...
`printDeprecationMessage` is used to deprecate modules
and execution branches.
PR-URL: https://github.com/nodejs/io.js/pull/1822
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-04 10:59:43 +03:00
Rich Trott
6537fd4b55
test: remove TODO
...
It's not clear what additional tests are wanted.
The current malformed URL test seems adequate.
PR-URL: https://github.com/nodejs/io.js/pull/1875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2015-06-04 11:38:57 +10:00
Saúl Ibarra Corretgé
b5cd2f0986
dgram: partially revert 18d457b
...
Revert "dgram: call send callback asynchronously" partially, since the
fix is now done in libuv.
Refs: https://github.com/nodejs/io.js/pull/1313
Refs: https://github.com/libuv/libuv/pull/371
PR-URL: https://github.com/nodejs/io.js/pull/1889
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-06-04 00:09:39 +02:00
Saúl Ibarra Corretgé
aa33db3238
deps: update libuv to version 1.6.0
...
Fixes: https://github.com/joyent/node/issues/9310
PR-URL: https://github.com/nodejs/io.js/pull/1889
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-06-04 00:09:05 +02:00
Santiago Gimeno
a804026c9b
test: fix broken FreeBSD test
...
Fixes net-server-max-connections-close-makes-more-available
Handles connection 'error' event so the test ends.
PR-URL: https://github.com/nodejs/io.js/pull/1881
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
2015-06-03 13:38:03 -07:00
Evan Lucas
43a82f8a71
test: fix test-sync-io-option
...
This test was failing occasionally both locally and on CI. Switched
from using spawn to execFile for a more reliable test.
Fixes: https://github.com/nodejs/io.js/issues/1837
PR-URL: https://github.com/nodejs/io.js/pull/1840
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-03 13:23:25 -05:00
Shigeki Ohtsu
4ed25f664d
test: add -no_rand_screen for tls-server-verify
...
This improves the performance of openssl s_client on Windows and
gains several seconds to finish test-tls-server-verify.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:23 +02:00
Shigeki Ohtsu
0ee497f0b4
deps: add -no_rand_screen to openssl s_client
...
In openssl s_client on Windows, RAND_screen() is invoked to initialize
random state but it takes several seconds in each connection.
This added -no_rand_screen to openssl s_client on Windows to skip
RAND_screen() and gets a better performance in the unit test of
test-tls-server-verify.
Do not enable this except to use in the unit test.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:22 +02:00
Shigeki Ohtsu
4cf323d23d
test: kill child in tls-server-verify for speed up
...
For better performance of the test, the parent kills child processes
so as not to wait them to be ended.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:21 +02:00
João Reis
e6ccdcc1fe
test: improve console output of tls-server-verify
...
When running in parallel, it is not easy to identify what server and
client failed when the test fails. This adds identifiers to all lines
of console output.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:20 +02:00
João Reis
975e5956f0
test: run tls-server-verify servers in parallel
...
Different servers must use different ports. Since we can count only on
common.PORT and common.PORT+1, run only 2 servers in parallel.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:19 +02:00
João Reis
b18604ba2c
test: running tls-server-verify clients in parallel
...
OpenSSL s_client introduces some delay on Windows. With all clients
running sequentially, this delay is big enough to break CI. This fix runs
the clients in parallel (unless the test includes renegotiation),
reducing the total run time.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:17 +02:00
Rod Vagg
f78c722df5
test: remove hardwired references to 'iojs'
...
PR-URL: https://github.com/nodejs/io.js/pull/1882
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Roman Reiss <me@silverwind.io >
2015-06-03 16:53:05 +02:00
Rich Trott
bd99e8de8e
test: more test coverage for maxConnections
...
If the server is not accepting connections because maxConnections
is exceeded, the server should start accepting connections again
when a connection closes.
PR-URL: https://github.com/nodejs/io.js/pull/1855
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
2015-06-02 21:01:21 -07:00
Ben Noordhuis
8c71a9241d
src: hide InitializeICUDirectory symbol
...
Exporting it seems like an oversight. It's not safe to call once
V8 is running so there doesn't seem to be a point in exporting it
to add-ons. Un-export it.
PR-URL: https://github.com/nodejs/io.js/pull/1815
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-06-02 21:44:18 +02:00
Yosuke Furukawa
8357c5084b
fs: set encoding on fs.createWriteStream
...
Enable encoding option on fs.createWriteStream.
PR-URL: https://github.com/nodejs/io.js/pull/1844
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-06-03 03:01:35 +09:00
Ben Noordhuis
a4dbf45b59
crypto: update root certificates
...
Update the list of root certificates in src/node_root_certs.h with
tools/mk-ca-bundle.pl.
PR-URL: https://github.com/nodejs/io.js/pull/1833
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2015-06-02 19:28:14 +02:00
Ben Noordhuis
098354a9f8
tools: update certdata.txt
...
This is the latest certdata.txt from [0], last updated on 2015-04-20.
[0] https://hg.mozilla.org/mozilla-central/raw-file/aa275ad846f1/security/nss/lib/ckfw/builtins/certdata.txt
PR-URL: https://github.com/nodejs/io.js/pull/1833
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2015-06-02 19:27:49 +02:00
Ben Noordhuis
a2d921d6a0
tools: customize mk-ca-bundle.pl
...
Remove unneeded functionality and tweak the generated output so we
can #include it in C++ source code.
This commit essentially reapplies the changes from commit e159073
("tools: customize mk-ca-bundle.pl") to the updated script.
PR-URL: https://github.com/nodejs/io.js/pull/1833
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2015-06-02 19:27:47 +02:00