Commit Graph

7031 Commits

Author SHA1 Message Date
Bert Belder
ff22a0cb15 openssl: reduce memory consumption
SSL records may be as large as 16K, but are typically < 2K.  In
addition, a historic bug in Windows allowed records to be as large
32K.  OpenSSL statically allocates read and write buffers (34K and
18K respectively) used for processing records.

With this patch, OpenSSL statically allocates 4K + 4K buffers, with
the option of dynamically growing buffers to 34K + 4K, which is a
saving of 44K per connection for the typical case.

This patch is taken from the Android Open Source Project.
2012-09-12 05:23:47 +02:00
Bert Belder
b61ae54e18 openssl: upgrade to vanilla openssl 1.0.1c 2012-09-12 00:40:55 +02:00
Ben Noordhuis
c8c638a841 buffer: change prototype of Data() and Length()
Make Buffer:Data() and Buffer::Length() accept a Value instead of an Object.
2012-09-11 18:33:30 +02:00
Ben Noordhuis
eaf1343100 crypto: remove legacy openssl compatibility code
Remove code that works around a padding bug in older versions of openssl, the
bundled version of openssl contains the bug fix.
2012-09-11 15:42:04 +02:00
Ben Noordhuis
98d53ac51e test: add AES-256 padding crypto test 2012-09-11 15:40:39 +02:00
Ben Noordhuis
5d9968f53d installer: don't install header files
They are no longer necessary now that node-waf has been removed. People need to
switch to node-gyp.
2012-09-10 01:31:13 +02:00
Nathan Rajlich
dba47aefa5 docs: fix typo in Buffer#toJSON() docs 2012-09-09 11:15:45 -07:00
Nathan Rajlich
a4ef01df07 buffer: implement Buffer.prototype.toJSON()
Returns an Array-representation of the Buffer.
Closes #3905.
2012-09-09 11:04:16 -07:00
Fedor Indutny
8e0c830cd0 tls: async session storage 2012-09-05 02:01:54 +04:00
Ben Noordhuis
790d651f0d http: make http.ServerResponse emit 'end'
This used to be the internal 'finish' event. Make it public so API users will
know when the response has been sent completely.

Fixes #3855.
2012-09-04 22:07:48 +02:00
Ben Noordhuis
7b6d3cea2c build: add ninja support to Makefile 2012-09-04 16:04:01 +02:00
Timothy J Fontaine
d3135e0f57 build: add configure option to build with ninja 2012-09-04 16:04:01 +02:00
Ben Noordhuis
2efa3ae64f installer: reapply b21c8e0b, honor --without-npm
This bug was already fixed in the v0.8 branch but git skips the patch when
merging v0.8 into master. Reapply it manually.

Fixes #3961.
2012-09-04 15:08:32 +02:00
Ben Noordhuis
972cdf82f1 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	deps/uv/include/uv.h
	src/node_crypto.cc
2012-09-04 15:02:20 +02:00
Ben Noordhuis
19a432260c test: add extra checks in simple/test-cli-eval 2012-09-04 14:41:08 +02:00
Ben Noordhuis
83b1dda12f cli: make argument to -p optional 2012-09-04 14:39:31 +02:00
Atsuya Takagi
9f57e422cf doc: fix typo in api/cluster 2012-09-04 00:41:40 +02:00
Ben Noordhuis
7dfa587d18 crypto, tls: make setSNICallback() compatible with domains 2012-09-03 23:33:02 +02:00
Ben Noordhuis
7d0543c128 crypto: make pbkdf2() compatible with domains 2012-09-03 23:33:02 +02:00
Ben Noordhuis
d1eff9ab68 crypto: make randomBytes() compatible with domains
Don't execute the callback in the context of the global object.

MakeCallback() tries to apply the active domain to the callback. If the user
polluted the global object with a 'domain' property, as in the code example
below, MakeCallback() will try to apply that.

Example:

    domain = {};                // missing var keyword is intentional
    crypto.randomBytes(8, cb);  // TypeError: undefined is not a function

Fixes #3956.
2012-09-03 23:33:02 +02:00
Bert Belder
ea1cba6246 windows: don't blow when a signal handler is attached
Blowing up when the user attaches a signal handler makes no sense. Also,
in Node 0.10 signals will be supported, so allow people to get used to
it.
2012-09-03 19:05:40 +02:00
Ben Noordhuis
f03c3203a1 cli: make -p equivalent to -pe
Fixes #3938.
2012-09-03 16:42:20 +02:00
koichik
7f404e3509 buffer: added support for writing NaN and Infinity
to writeDoubleBE(), writeDoubleLE(), writeFloatBE() and writeFloatLE().
Fixes #3934.
2012-09-02 21:01:43 +09:00
koichik
37f0eb8df3 Revert "buffer: added support for writing NaN and Infinity"
This reverts commit 6b9425fe37.
2012-09-02 20:59:50 +09:00
Ben Noordhuis
870307de75 crypto: fix build error on OS X
pthread_t is a pointer type on OS X but an unsigned long on most other
platforms. Use a C style cast because reinterpret_cast nor static_cast
work in all cases.
2012-09-02 13:49:15 +02:00
Ben Noordhuis
6c5fdd5223 doc: document prerequisites in README 2012-09-02 13:32:57 +02:00
koichik
6b9425fe37 buffer: added support for writing NaN and Infinity
to writeDoubleBE(), writeDoubleLE(), writeFloatBE() and writeFloatLE().
Fixes #3934.
2012-09-02 00:27:17 +09:00
Ben Noordhuis
298f6bff5b crypto: use CRYPTO_THREADID_set_callback()
Don't use CRYPTO_set_id_callback(), it's deprecated.
2012-08-31 00:40:18 +02:00
Shigeki Ohtsu
f347077e78 tls: support unix domain socket/named pipe in tls.connect 2012-08-31 00:23:36 +02:00
Bert Belder
ed103409c4 uv: upgrade to 5eb1d19 2012-08-30 17:29:47 +02:00
Bert Belder
9603f08f21 uv: upgrade to 24c062c 2012-08-30 17:28:02 +02:00
Bert Belder
b0d2795fe9 child process: fix processes with IPC channel don't emit 'close'
With this patch the IPC socket is no longer available in the
ChildProcess.stdio array. This shouldn't be very problematic, since
this socket was effectively non-functional; it would never emit any
events.
2012-08-30 16:13:27 +02:00
Nathan Rajlich
355c148427 build: set process.platform to "sunos" on SunOS
gyp sets it to "solaris" by default, but versions of node v0.6.x and
older would report "sunos". Let's keep things consistent.

Fixes #3944.
2012-08-29 16:12:59 -07:00
Nathan Rajlich
606a933989 build: set process.platform to "sunos" on SunOS
gyp sets it to "solaris" by default, but versions of node v0.6.x and
older would report "sunos". Let's keep things consistent.

Fixes #3944.
2012-08-29 15:36:15 -07:00
Ankur Oberoi
a57d31595d doc: fix grammar errors 2012-08-30 00:27:00 +02:00
Ben Noordhuis
4784ea1a29 deps: upgrade http_parser to ad3b631 2012-08-30 00:06:47 +02:00
Ben Noordhuis
8bec26122d tls, https: throw exception on missing key/cert
Throw an exception in the tls.Server constructor when the options object
doesn't contain either a PFX or a key/certificate combo.

Said change exposed a bug in simple/test-tls-junk-closes-server. Addressed.

Fixes #3941.
2012-08-29 22:53:07 +02:00
isaacs
dec16aa5c2 Test client renegotiation attacks on HTTPS
This test should output roughly the same results as the tls ci-reneg attack
pummel test.  However, it does not.
2012-08-29 12:26:28 -07:00
Ben Noordhuis
e4cef1a083 doc: update assert.doesNotThrow() docs
It takes an optional "expected exception" argument that is not used meaningfully
but is nevertheless documented. Undocument it, it confuses casual readers of the
documentation.

Fixes #3935.
2012-08-29 02:36:22 +02:00
isaacs
0ef1e5b5eb blog: Post for 0.9.1 release 2012-08-28 15:34:08 -07:00
isaacs
459717efb6 Now working on 0.9.2 2012-08-28 15:32:01 -07:00
isaacs
1550ddaa6b Merge branch 'v0.9.1-release' 2012-08-28 15:31:40 -07:00
isaacs
e6ce259d2c 2012.08.28, Version 0.9.1 (Unstable)
* buffer: Add Buffer.isEncoding(enc) to test for valid encoding values (isaacs)

* Raise UV_ECANCELED on premature close. (Ben Noordhuis)

* Remove c-ares from libuv, move to a top-level node dependency (Bert Belder)

* ref/unref for all HandleWraps, timers, servers, and sockets (Timothy J Fontaine)

* addon: remove node-waf, superseded by node-gyp (Ben Noordhuis)

* child_process: emit error on exec failure (Ben Noordhuis)

* cluster: do not use internal server API (Andreas Madsen)

* constants: add O_DIRECT (Ian Babrou)

* crypto: add sync interface to crypto.pbkdf2() (Ben Noordhuis)

* darwin: emulate fdatasync() (Fedor Indutny)

* dgram: make .bind() always asynchronous (Ben Noordhuis)

* events: Make emitter.listeners() side-effect free (isaacs, Joe Andaverde)

* fs: Throw early on invalid encoding args (isaacs)

* fs: fix naming of truncate/ftruncate functions (isaacs)

* http: bubble up parser errors to ClientRequest (Brian White)

* linux: improve cpuinfo parser on ARM and MIPS (Ben Noordhuis)

* net: add support for IPv6 addresses ending in :: (Josh Erickson)

* net: support Server.listen(Pipe) (Andreas Madsen)

* node: don't scan add-on for "init" symbol (Ben Noordhuis)

* remove process.uvCounters() (Ben Noordhuis)

* repl: console writes to repl rather than process stdio (Nathan Rajlich)

* timers: implement setImmediate (Timothy J Fontaine)

* tls: fix segfault in pummel/test-tls-ci-reneg-attack (Ben Noordhuis)

* tools: Move gyp addon tools to node-gyp (Nathan Rajlich)

* unix: preliminary signal handler support (Ben Noordhuis)

* unix: remove dependency on ev_child (Ben Noordhuis)

* unix: work around darwin bug, don't poll() on pipe (Fedor Indutny)

* util: Formally deprecate util.pump() (Ben Noordhuis)

* windows: make active and closing handle state independent (Bert Belder)

* windows: report spawn errors to the exit callback (Bert Belder)

* windows: signal handling support with uv_signal_t (Bert Belder)
2012-08-28 15:27:49 -07:00
Bert Belder
143e9bef47 test: make test-fs-truncate pass on windows 2012-08-29 00:16:53 +02:00
Bert Belder
4cfd64e0db uv: upgrade to abc945b 2012-08-28 22:49:34 +02:00
Bearice Ren
ef3617c6f8 build: fix make -j' fails after make clean'
make fails if:
    ./configure && make clean && make -j6

as out/Makefile has not yet be made when entering sub dirs
2012-08-28 22:10:56 +02:00
Bert Belder
69d8e77f17 uv: upgrade to 162e57b 2012-08-28 21:50:33 +02:00
Bert Belder
c06e1002c8 windows: make test-child-process-exec-error pass 2012-08-28 21:46:58 +02:00
Ian Babrou
3b17f3b80a constants: add O_DIRECT
This will allow to speed up file i/o in some cases by usage of right offsets
and buffer sizes.
2012-08-28 15:04:55 +02:00
Bert Belder
bf16d9280e Merge branch 'v0.8'
Conflicts:
	ChangeLog
	deps/openssl/openssl.gyp
	src/node_version.h
2012-08-28 02:54:22 +02:00