summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tls: set _connecting before starting the flowfix/orangemocha-readable-stuffFedor Indutny2014-04-141-2/+9
| | | | | | | | | | | | | | | | | | | | When creating a TLSSocket instance based on the existing connecting socket, `_connecting` property is copied after the initialization of `net.Socket`. However, since `net.Socket` constructor will call `.read(0)` if the `readable` is true - error may happen at this code chunk in net.js: Socket.prototype._read = function(n) { debug('_read'); if (this._connecting || !this._handle) { debug('_read wait for connection'); this.once('connect', this._read.bind(this, n)); ... Leading to a test failures on windows: - test/simple/test-tls-connect-given-socket.js
* main: Handle SIGINT properly.Geir Hauge2014-04-121-6/+9
| | | | | | As explained by http://www.cons.org/cracauer/sigint.html Signed-off-by: Fedor Indutny <fedor@indutny.com>
* buffer: return uint if MSB is 1 in readUInt32goussardg2014-04-102-2/+25
| | | | | | | | | | | | Fix issue where a signed integer is returned. Example: var b = new Buffer(4); b.writeUInt32BE(0xffffffff); b.readUInt32BE(0) == -1 Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* buffer: truncate buffer after string decodeFedor Indutny2014-04-113-1/+49
| | | | | | | | | | When our estimates for a storage size are higher than the actual length of decoded data, the destination buffer should be truncated. Otherwise `Buffer::Length` will give misleading information to C++ layer. fix #7365 Signed-off-by: Fedor Indutny <fedor@indutny.com>
* test: remove vm-infinite-recursionFedor Indutny2014-04-111-30/+0
| | | | | | | | It doesn't work reliably on all platforms. see #7432 Signed-off-by: Fedor Indutny <fedor@indutny.com>
* test: add `reuseAddr` in dgram-multicast...Fedor Indutny2014-04-101-1/+4
| | | | Add `reuseAddr` option in `test-dgram-multicast-multi-process.js`
* dgram: introduce `reuseAddr` optionFedor Indutny2014-04-104-4/+33
| | | | | | | | | | | | | | | Introduce new signature for both `dgram.createSocket` method and `dgram.Socket` constructor: dgram.createSocket(options, [listener]) Options should contain `type` property and may contain `reuseAddr` property. When `reuseAddr` is `true` - SO_REUSEADDR will be issued on socket on bind. fix #7415 Signed-off-by: Fedor Indutny <fedor@indutny.com>
* openssl: fix keypress requirement in apps on win32Alexis Campailla2014-04-081-6/+13
| | | | | | | | | Re-applying commit 153784b3489e2feb9d93a3a5eee5a4aa34f74e39, which was overwritten by the update to openssl 1.0.1f. Original source: http://openssl.6102.n7.nabble.com/PATCH-s-client-Fix-keypress-requirement-with-redirected-input-on-Windows-td46787.html
* test: fix test-cryptoFedor Indutny2014-04-081-1/+2
|
* Merge branch 'v0.10'Fedor Indutny2014-04-08133-244/+14983
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: deps/openssl/asm/x64-elf-gas/aes/vpaes-x86_64.s deps/openssl/asm/x64-macosx-gas/aes/vpaes-x86_64.s deps/openssl/asm/x64-win32-masm/aes/vpaes-x86_64.asm deps/openssl/openssl/CHANGES deps/openssl/openssl/Makefile deps/openssl/openssl/Makefile.org deps/openssl/openssl/NEWS deps/openssl/openssl/README deps/openssl/openssl/crypto/opensslv.h deps/openssl/openssl/openssl.spec deps/openssl/openssl/ssl/s23_clnt.c lib/http.js test/simple/test-http-client-readable.js
| * deps: update openssl to 1.0.1gfix/openssl-1.0.1gFedor Indutny2014-04-08256-6208/+49230
| |
| * http: do not emit EOF non-readable socketFedor Indutny2014-04-082-3/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Socket may become not `readable`, but http should not rely on this property and should not think that it means that no data will ever arrive from it. In fact, it may arrive in a next tick and, since `this.push(null)` was already called, it will result in a error like this: Error: stream.push() after EOF at readableAddChunk (_stream_readable.js:143:15) at IncomingMessage.Readable.push (_stream_readable.js:123:10) at HTTPParser.parserOnBody (_http_common.js:132:22) at Socket.socketOnData (_http_client.js:277:20) at Socket.EventEmitter.emit (events.js:101:17) at Socket.Readable.read (_stream_readable.js:367:10) at Socket.socketCloseListener (_http_client.js:196:10) at Socket.EventEmitter.emit (events.js:123:20) at TCP.close (net.js:479:12) fix #6784
| * doc: add missing spaceBrian White2014-04-071-1/+1
| | | | | | | | Signed-off-by: Fedor Indutny <fedor@indutny.com>
| * docs: correct tls docs. server -> clientDominic Tarr2014-04-021-1/+1
| | | | | | | | | | when a pfx file is passed to tls.connection, it is the client private key, not the server's private key.
| * doc: typo clean up in tlsGoh Yisheng (Andrew)2014-03-311-2/+2
| |
| * build: windows signing should include timestampsJosh Dague2014-03-271-2/+4
| | | | | | | | | | | | | | | | | | Previously the build artifacts did not include a signed timestamp, so when the certificate expired the validation of the artifact would fail. Now we sign against a timestamp server such that the artifact will always be valid regardless of the disposition of the certificate. Closes #7360 and #7059.
* | src: fix use of uv_cwd, len includes the NULL byteSaúl Ibarra Corretgé2014-04-071-7/+1
| |
* | src: update uv callbacks after API changesSaúl Ibarra Corretgé2014-04-078-20/+18
| | | | | | | | | | async, timer, prepare, idle and check handles no longer get a status parameter since they can never fail.
* | deps: update libuv to v0.11.23Fedor Indutny2014-04-0782-310/+1807
| |
* | util: made util.isArray a direct alias for Array.isArrayEvan Carroll2014-04-032-4/+3
| |
* | domain: don't crash on "throw null"Alex Kocharin2014-04-022-2/+19
| | | | | | | | Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* | lib: use triple equalsYuki KAN2014-04-025-10/+10
| | | | | | | | Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* | node: add signature to SET_PROTOTYPE_METHODC. Scott Ananian2014-04-0223-145/+211
| | | | | | | | | | | | | | | | | | | | This prevents segfaults when a native method is reassigned to a different object (which corrupts args.This()). When unwrapping, clients should use args.Holder() instead of args.This(). Closes #6690. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* | buffer: improve {read,write}{U}Int* methodsNick Apperson2014-04-013-144/+80
| | | | | | | | | | | | | | | | | | | | | | | | Increase the performance and simplify the logic of Buffer#write{U}Int* and Buffer#read{U}Int* methods by placing the byte manipulation code directly inline. Also improve the speed of buffer-write benchmarks by creating a new call directly to each method by using Function() instead of calling by buff[fn]. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* | src: fix up after v8 upgradeBen Noordhuis2014-04-023-9/+13
| | | | | | | | | | | | | | | | | | The two biggest changes are that v8::Script::New() has been removed and that a v8::Script object now has to be explicitly bound to a context if you want to run it from another context. We can accommodate both changes without breaking the vm module's public API or even the internal JS API.
* | deps: fix up v8 postmortem codegenBen Noordhuis2014-04-021-3/+7
| | | | | | | | Fix up overzealous parses, strip whitespace from class and field names.
* | deps: upgrade v8 to 3.25.30Ben Noordhuis2014-04-02689-22900/+112826
| |
* | test: make test-smalloc endian awareAndrew Low2014-04-011-2/+8
| | | | | | | | | | | | | | | | | | | | The test/simple/test-smalloc.js has an implicit assumption of the byte order of the data stored for Double and Uint32 values. On a big endian platform this test fails without these patches. Use os.endianness() to detect the endian of the platform and use it to gate the static value used for comparison.
* | v8: upgrade to 3.24.35.22Trevor Norris2014-04-0136-152/+529
| |
* | configure: make --v8-options switch more robustBen Noordhuis2014-04-013-28/+9
| | | | | | | | | | | | | | Improve on commit b55c9d6 by not requiring that switches are comma separated. This commit makes `./configure --v8-options="--foo --bar"` work and takes special care to properly escape quotes in the options string.
* | fs: improve performance of all stat functionsJames Pickard2014-03-314-40/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | By building the fs.Stats object in JS, which is returned by all fs stat functions, calls to v8::Object::Set() are removed. This also includes creating all associated Date objects in JS, rather than using v8::Date::New(). Both these changes have significant performance gains. Note that the returned value from fs.stat changes slightly for non-POSIX systems. Whereas before the stats object would be missing blocks and blksize keys, it now has these keys with undefined as the value. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* | crypto: move `createCredentials` to tlsFedor Indutny2014-03-2917-163/+222
| | | | | | | | | | | | | | | | Move `createCredentials` to `tls` module and rename it to `createSecureContext`. Make it use default values from `tls` module: `DEFAULT_CIPHERS` and `DEFAULT_ECDH_CURVE`. fix #7249
* | configure: --v8-options optionFedor Indutny2014-03-294-1/+41
| | | | | | | | | | Introduce a way to set some v8 flags at compile time, the values should be separated by comma.
* | http: better client "protocol not supported" errorNathan Rajlich2014-03-282-7/+8
| | | | | | | | | | | | | | | | Include the "expected protocol" in the Error message string, which evaluates to "http:" for the `http` core module, and "https:" for the `https` module. Closes #7355.
* | deps: apply floating patch to v8dcarney@chromium.org2014-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message below: fix FunctionCallbackInfo ambiguity - when compiling tools that embed v8 with g++ FunctionCallbackInfo is currently ambigous - more info: https://github.com/joyent/node/issues/7337 - original patch is here: https://codereview.appspot.com/78770045/ TBR=svenpanne@chromium.org Review URL: https://codereview.chromium.org/201573012 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
* | tls: do not call SNICallback unless presentFedor Indutny2014-03-272-1/+4
| | | | | | | | | | | | | | | | When asynchronously parsing ClientHello for session resumption - SNICallback may not be set. Check if it is present before invoking it. fix #7010
* | tls: force readable/writable to `true`Fedor Indutny2014-03-272-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These are an old and deprecated properties that was used by previous stream implementation, and are still in use in some user-land modules. Prior to this commit, they were read from the underlying socket, which may be non-readable/non-writable while connecting or while staying uninitialized. Force set them to `true`, just to make sure that there will be no inconsistency. fix #7152
* | crypto: fix lintFedor Indutny2014-03-261-1/+3
| |
* | Merge remote-tracking branch 'origin/v0.10'Fedor Indutny2014-03-26320-4042/+5604
|\ \ | |/ | | | | | | | | | | Conflicts: src/node.cc src/node_crypto.cc src/node_crypto.h
| * src: ensure that openssl's PRNG is fully seededBen Noordhuis2014-03-261-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that OpenSSL has enough entropy (at least 256 bits) for its PRNG. The entropy pool starts out empty and needs to fill up before the PRNG can be used securely. OpenSSL normally fills the pool automatically but not when someone starts generating random numbers before the pool is full: in that case OpenSSL keeps lowering the entropy estimate to thwart attackers trying to guess the initial state of the PRNG. When that happens, we wait until enough entropy is available, something that normally should never take longer than a few milliseconds. Fixes #7338.
| * src: seed V8's random number generator at startupBen Noordhuis2014-03-263-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default entropy source is /dev/urandom on UNIX platforms, which is okay but we can do better by seeding it from OpenSSL's entropy pool. On Windows we can certainly do better; on that platform, V8 seeds the random number generator using only the current system time. Fixes #6250. NB: This is a back-port of commit 7ac2391 from the master branch that for some reason never got back-ported to the v0.10 branch. The default on UNIX platforms in v0.10 is different and arguably worse than it is with master: if no entropy source is provided, V8 3.14 calls srandom() with a xor of the PID and the current time in microseconds. That means that on systems with a coarse system clock, the initial state of the PRNG may be easily guessable. The situation on Windows is even more dire because there the PRNG is seeded with only the current time... in milliseconds.
| * npm: upgrade to 1.4.6isaacs2014-03-25318-4042/+5566
| | | | | | | | | | | | | | | | | | * Documentation upgrades * Fix glob bug which prevents proper README publishing * node-gyp upgrade to 0.13 * Documentation updates * Add --save-exact to save an exact dep (instead of a range) * alias 't' to 'test'
| * build: fix g++ 4.8 build, disable -WerrorBen Noordhuis2014-03-232-3/+1
| | | | | | | | | | | | | | | | | | Turn off -Werror when building V8, it hits -Werror=unused-local-typedefs with g++ 4.8. The warning itself is harmless so don't abort the build. This was originally implemented in commit d2ab314e back in 2011 but the build process has gone through a few iterations since then, that change no longer works.
* | doc: remove `agent.request()` call in exampleNathan Rajlich2014-03-251-1/+2
| | | | | | | | | | | | | | The `Agent#request()` function was removed in f3189ace6b5e31a874df421ac2f74da0e77cb14d, so don't use it in the documentation example. The function wasn't documented in the first place.
* | http: use defaultAgent.protocol in protocol checkNathan Rajlich2014-03-242-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Default to the `defaultAgent.protocol` when comparing the user-specified `options.protocol` string. This is so that `http.Agent` instances do not need to specify their own `protocol` field, since we have the relevant information already from the `defaultAgent`. Note that the test case could be separately cherry-picked to the `v0.10` branch, since it already passes correctly. Fixes #7349. Fixes the regression described in: http://git.io/2ds-WQ
* | vm: share security token between contextsFedor Indutny2014-03-212-1/+35
| | | | | | | | | | | | | | By default, each `v8::Context` has a different Security Token, which prevents access to one context from another. fix #7140
* | pipe_wrap: use Instantiate() methodTrevor Norris2014-03-171-2/+1
| | | | | | | | | | Retrieve a new client object via PipeWrap::Instantiate(). This method performs appropriate checks to make sure everything is as it should be.
* | headers: remove env.h from node_internals.hFedor Indutny2014-03-182-20/+77
| | | | | | | | | | | | | | | | `env.h` is an internal header file and should not be copied or exposed to the users. Additionally, export convenience `Throw*` methods with `v8::Isolate*` as a first argument.
* | deps: update v8 to 3.24.35.17Fedor Indutny2014-03-18312-79458/+5836
| |
* | test: update our branched weakref to v8 3.24Timothy J Fontaine2014-03-171-31/+27
| |