Commit Graph

9791 Commits (d0ff900a65e4250ad49dcf02e07262af1fa5de25)

Author SHA1 Message Date
Fedor Indutny 528a3ce3ed tls: more session configuration options, methods
Introduce `ticketKeys` server option, `session` client option,
`getSession()` and `getTLSTicket()` methods.

fix #7032
2014-02-05 23:28:34 +04:00
Fedor Indutny 5ce458032f contextify: handle infinite recursion errors
Try to be consistent with v0.10 and emit "Maximum call stack size
reached", even if it happens when allocating context or doing other
stuff.

fix #7045
2014-02-05 14:20:02 +04:00
Alexis Campailla bae545dab7 test: fix test-tcp-wrap-listen
If the call to writeBuffer completes asynchronously, we need to have
an oncomplete callback on the request object no matter what. The
writeQueueSize seems irrelvant to that regard.

Note that on Windows writeBuffer always completes asynchronously.

See related commit 9836a4eeda
2014-02-04 22:51:11 +04:00
Benjamin Waters d2147c55c2 doc: fix references to error keyword
References for err.signal and err.code should be error.signal and
error.code.

Fixes joyent/node#6862
2014-02-04 12:50:24 +04:00
Alexis Campailla 15de8c2b60 openssl: fix keypress requirement in apps on win32
Re-applying commit 153784b348, 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
2014-02-04 12:48:07 +04:00
Yuriy Nemtsov f65ce02ddd doc: fix after message in addAsyncListener example 2014-02-04 12:44:15 +04:00
Ben Noordhuis 09c51d5e40 crypto: update root certificates
Update the list of root certificates in src/node_root_certs.h with
tools/mk-ca-bundle.pl and update src/node_crypto.cc to make use of
the new format.

Fixes #6013.
2014-02-04 01:42:52 +04:00
Fedor Indutny 2315703035 zlib: separate sync/async methods 2014-02-04 01:41:02 +04:00
Fedor Indutny 9a60bf3726 tls: fix crash in SNICallback
`tls_wrap.cc` was crashing in an `Unwrap` call, when non
`SecureContext` object was passed to it. Check that the passed object
is a `SecureContext` instance before unwrapping it.

fix #7008
2014-02-04 01:35:08 +04:00
Oguz Bastemur 3dcf7253a8 debugger: remove unused definition `currentSource`
Client's property `currentSource` has no use throughout the project.
2014-02-03 20:35:49 +04:00
Maxime Quandalle 154d9d2163 doc: add an example about multiple extensions
`path.extname` returns only the last extension
2014-02-03 12:38:40 +04:00
Nikolai Vavilov 9b37b83a20 zlib: add sync versions for convenience methods 2014-02-01 03:45:45 +04:00
Fedor Indutny 643a7d8c16 dtrace: fix arguments warning
Add enough arguments to `NODE_NET_SOCKET_READ()` and
`NODE_NET_SOCKET_WRITE()` stubs.
2014-02-01 00:45:55 +04:00
Fedor Indutny fac8f396cc deps: backport 883637bd from latest v8
Original commit message:

  VS2013 contains a number of improvements, most notably the addition
  of all C99 math functions.

  I'm a little bit concerned about the change I had to make in
  cpu-profiler.cc, but I spent quite a bit of time looking at it and was
  unable to figure out any rational explanation for the warning. It's
  possible it's spurious. Since it seems like a useful warning in
  general   though, I chose not to disable globally at the gyp level.

  I do think someone with expertise here should probably try to
  determine if this is a legitimate warning.

  BUG=288948
  R=dslomov@chromium.org

  Review URL: https://codereview.chromium.org/23449035

NOTE: Path applied without `cpu-profiler.cc` changes because in our
version it was looking totally different.
2014-02-01 00:45:55 +04:00
Alexis Campailla 49c2372e68 test: delete invalid http test
The test is no longer valid for the original scenario.

It now fails intermittently because of two other issues:
1. Since the client is only processing one readable event, the
   client request is not enough to keep the process alive and the
   process can exit before the desired events have been raised.
2. Reading just 1 byte is not enough to guarantee that the parser
   will eventually consume all the data and raise the desired
   parse error. I tried postponing the server.close() to address
   the issue at [1], but then the test just hangs sometimes.
2014-01-30 21:52:07 +04:00
Fedor Indutny e796e11087 node: do not ever close stdio
Even if stdio streams are opened as file streams, we should not ever try
to close them. This could be accomplished by passing `autoClose: false`
in options on their creation.
2014-01-30 21:26:19 +04:00
Timothy J Fontaine c8c26f12e4 src: move header inclusion out of namespace
The placement of a previous fix to include proper size_t types in
addons was erroneously placed inside a namespace, move to just before.

Fix #6992
2014-01-29 09:37:29 -08:00
Timothy J Fontaine a98d541733 blog: Post for v0.11.11 2014-01-28 19:48:54 -08:00
Timothy J Fontaine e63268e433 Now working on 0.11.12 2014-01-28 19:46:17 -08:00
Timothy J Fontaine 245cf3f746 Merge branch 'v0.11.11-release' 2014-01-28 19:46:04 -08:00
Timothy J Fontaine b46e774215 2014.01.29, Version 0.11.11 (Unstable)
* v8: Upgrade to 3.22.24.19

* http_parser: Upgrade to 2.2.1

* openssl: Upgrade to 1.0.1f

* uv: Upgrade to 0.11.18

* async-listener: revamp of subsystem (Trevor Norris)

* node: do not ever close stdio (Fedor Indutny)

* http: use writev on chunked encoding (Trevor Norris)

* async_wrap/timers: remove Add/RemoveAsyncListener (Trevor Norris)

* child_process: better error reporting for exec (Fedor Indutny)

* crypto: add newline to cert and key if not present (Fedor Indutny)

* crypto: clear error in GetPeerCertificate (Fedor Indutny)

* crypto: honor default ciphers in client mode (Jacob Hoffman-Andrews)

* crypto: introduce .setEngine(engine, [flags]) (Fedor Indutny)

* crypto: support custom pbkdf2 digest methods (Ben Noordhuis)

* domain: fix off-by-one in Domain.exit() (Ryan Graham)

* http: concatenate duplicate headers by default (Alex Kocharin)

* http: do not emit EOF non-readable socket (Fedor Indutny)

* node: fix argument parsing with -p arg (Alexis Campailla)

* path: improve POSIX path.join() performance (Jo Liss)

* tls: emit `clientError` on early socket close (Fedor Indutny)

* tls: introduce `.setMaxSendFragment(size)` (Fedor Indutny)

* tls: make cert/pfx optional in tls.createServer() (Ben Noordhuis)

* tls: process accumulated input (Fedor Indutny)

* tls: show human-readable error messages (Ben Noordhuis)

* util: handle escaped forward slashes correctly (Tom Gallacher)
2014-01-28 17:29:56 -08:00
Timothy J Fontaine 95b8a75d5e v8: Upgrade to 3.22.24.19 2014-01-28 17:16:28 -08:00
Wyatt Preul 8c05570258 docs: clarify origin in agent.maxSockets section 2014-01-29 03:39:54 +04:00
Fedor Indutny fc26fd6b38 node: do not ever close stdio
Even if stdio streams are opened as file streams, we should not ever try
to close them. This could be accomplished by passing `autoClose: false`
in options on their creation.
2014-01-29 03:27:23 +04:00
Fedor Indutny 597eb6a5ae deps: update http_parser to 2.2.1
Main changes:

  * Fixed content-length and chunk-size overflow test
2014-01-29 03:23:52 +04:00
Thom Seddon 657cd2c4e5 lib: fix unnecessary coercion in lib/net.js
Original patch by @skypjack in #6627
2014-01-29 03:08:06 +04:00
Thom Seddon 8eaa1ac463 lib: Remove unused var+operations in util.inspect
This was originally introduced in 6034701 to prevent the closing
brace being pushed onto the next line if an object is longer than
the max width, however the functionality was removed in d164989 but
the supplementary variables (and operations) were left behind
2014-01-29 03:08:06 +04:00
Timothy J Fontaine ab54e32bbd src: only define ssize_t on windows if undefined
This matches how libuv handles the definition of ssize_t, by
typedef'ing intptr_t to ssize_t.

However, in the future we will use portable types from stddef.h
2014-01-28 15:07:40 -08:00
Fedor Indutny 9836a4eeda stream_wrap: use `uv_try_write` where possible
Use `uv_try_write` for string and buffer writes, thus avoiding to do
allocations and copying in some of the cases.
2014-01-29 02:49:03 +04:00
Fedor Indutny eaf76648a6 node: explicitly include `sys/types.h` for size_t
fix #6724
2014-01-28 12:38:02 +04:00
Timothy J Fontaine 114bff467e test: use logical and not or in abort-fatal-error 2014-01-27 18:27:10 -08:00
Timothy J Fontaine 2f5e77f55b test: make abort-fatal-error more robust
It's saner to check exit codes or signals to determine if the process
actually aborted. On OSX and Linux the exit code is 134, on SunOS it
propagates the SIGABRT signal
2014-01-27 18:14:57 -08:00
Timothy J Fontaine cd2d3aedaa test: fix test-net-listen-fd0 for pipes
In the case of a pipe'd input, i.e. from the CI the fd will be a PIPE
and when listen() is called it will return ENOTSOCK instead of EINVAL.
2014-01-27 17:39:45 -08:00
Keith M Wesolowski 76b98462e5 node: register modules from DSO constructors
Built-in modules should be automatically registered, replacing the
static module list.  Add-on modules should also be automatically
registered via DSO constructors.  This improves flexibility in adding
built-in modules and is also a prerequisite to pure-C addon modules.
2014-01-27 15:52:50 -08:00
Jacob Hoffman-Andrews f4c8020d10 crypto: honor default ciphers in client mode
Right now no default ciphers are use in, e.g. https.get, meaning that
weak export ciphers like TLS_RSA_EXPORT_WITH_DES40_CBC_SHA are
accepted.

To reproduce:

node -e "require('https').get({hostname: 'www.howsmyssl.com', \
  path: '/a/check'}, function(res) {res.on('data', \
  function(d) {process.stdout.write(d)})})"
2014-01-28 03:28:09 +04:00
Alexis Campailla dc1ffd0da6 test: race condition in test-cluster-disconnect
The test was not waiting for all the worker-created sockets
to be listening before calling cluster.disconnect().
As a result, the channels with the workers could get closed
before all the socket handles had been passed to them, leading
to various errors.
2014-01-27 11:54:53 -08:00
Alexis Campailla 14d6df8702 node: fix argument parsing with -p arg
node -p would cause an access violation.

Fixes test\message\stdin_messages.js on Windows.
2014-01-27 11:54:53 -08:00
Timothy J Fontaine c37e1b7c4b Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	src/node_crypto.cc
	test/simple/test-crypto.js
2014-01-27 11:02:59 -08:00
Jun Ma d2de8ba34d net: make Socket destroy() re-entrance safe
So that we are free to call socket.destroy() in error event handler.

fix #6769
2014-01-27 22:12:29 +04:00
Fedor Indutny 64d33a7519 deps: update uv to 0.11.18 2014-01-27 21:30:51 +04:00
Fedor Indutny b4c4e0bbaa crypto: throw on SignFinal failure
fix #6963
2014-01-26 22:24:57 +04:00
Fedor Indutny cc4b6e6e58 crypto: clear error in GetPeerCertificate
fix #6945
2014-01-26 03:48:36 +04:00
Fedor Indutny 00efcb4cd7 net: reset `endEmitted` on reconnect
fix #6908
2014-01-25 12:20:45 -08:00
Fedor Indutny 896e19330a deps: backport b5135bbc from c-ares repo
Original commit message:

    ares_parse_txt_reply: return a ares_txt_reply node for each sub-string

    Previously, the function would wrongly return all substrings merged into
    one.

fix #6931
2014-01-25 12:20:41 -08:00
Fedor Indutny 0ec3770767 doc: readline document TTY utils
fix #6933
2014-01-25 12:10:44 -08:00
Fedor Indutny a454063ea1 http: do not emit EOF non-readable socket
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
2014-01-25 12:03:20 -08:00
Timothy J Fontaine c1b1f31203 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/AUTHORS
	deps/uv/ChangeLog
	deps/uv/src/unix/process.c
	deps/uv/src/version.c
	lib/net.js
	node.gyp
	src/node_version.h
2014-01-24 19:13:50 -08:00
Fedor Indutny 640912d18a tls_wrap: propagate errors to write callbacks
fix #6903
2014-01-24 22:09:42 +04:00
Fedor Indutny d019eac5b5 tls: emit `clientError` on early socket close
fix #6903
2014-01-24 22:09:17 +04:00
Scott González 9975ff603b doc: fix typo in readline 2014-01-24 18:56:46 +04:00