Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
authorisaacs <i@izs.me>
Tue, 15 May 2012 18:37:34 +0000 (11:37 -0700)
committerisaacs <i@izs.me>
Tue, 15 May 2012 18:37:34 +0000 (11:37 -0700)
Conflicts:
ChangeLog
deps/uv/include/uv-private/uv-unix.h
deps/uv/src/unix/core.c
deps/uv/src/unix/sunos.c
deps/v8/src/runtime.cc
doc/api/crypto.markdown
lib/http.js
src/node_version.h
test/gc/test-http-client-timeout.js
wscript

18 files changed:
1  2 
ChangeLog
Makefile
doc/api/buffer.markdown
doc/api/crypto.markdown
doc/api/https.markdown
doc/api/stream.markdown
doc/api/tls.markdown
lib/crypto.js
lib/fs.js
lib/http.js
lib/path.js
lib/tls.js
src/node.js
src/node_crypto.cc
src/node_crypto.h
src/pipe_wrap.cc
test/simple/test-crypto.js
test/simple/test-path.js

diff --cc ChangeLog
+++ b/ChangeLog
 -2012.05.15 Version 0.6.18 (stable)
 +2012.04.18, Version 0.7.8, (unstable)
 +
 +* Upgrade V8 to 3.9.24.9
 +
 +* Upgrade OpenSSL to 1.0.0f
 +
 +* Upgrade npm to 1.1.18
 +
 +* Show licenses in Binary installers
 +
 +* Domains (isaacs)
 +
 +* readline: rename "end" to "close" (Nathan Rajlich)
 +
 +* tcp: make getsockname() return address family as string (Shigeki Ohtsu)
 +
 +* http, https: fix .setTimeout() (ssuda)
 +
 +* os: add cross platform EOL character (Mustansir Golawala)
 +
 +* typed arrays: unexport SizeOfArrayElementForType() (Aaron Jacobs)
 +
 +* net: honor 'enable' flag in .setNoDelay() (Ben Noordhuis)
 +
 +* child_process: emit error when .kill fails (Andreas Madsen)
 +
 +* gyp: fix 'argument list too long' build error (Ben Noordhuis)
 +
 +* fs.WriteStream: Handle modifications to fs.open (isaacs)
 +
 +* repl, readline: Handle newlines better (Nathan Rajlich, Nathan Friedly)
 +
 +* build: target OSX 10.5 when building on darwin (Nathan Rajlich)
 +
 +* Fix #3052 Handle errors properly in zlib (isaacs)
 +
 +* build: add support for DTrace and postmortem (Dave Pacheco)
 +
 +* core: add reusable Slab allocator (Ben Noordhuis)
 +
 +
 +2012.03.30, Version 0.7.7 (unstable), 5cda2542fdb086f9fe5de889bea435a65e377dea
 +
 +* Upgrade V8 to 3.9.24.7
 +
 +* Upgrade npm to 1.1.15
 +
 +* Handle Emoji characters properly (Erik Corry, Bert Belder)
 +
 +* readline: migrate ansi/vt100 logic from tty to readline (Nathan Rajlich)
 +
 +* readline: Fix multiline handling (Alex Kocharin)
 +
 +* add a -i/--interactive flag to force the REPL (Nathan Rajlich)
 +
 +* debugger: add breakOnException command (Fedor Indutny)
 +
 +* cluster: kill workers when master dies (Andreas Madsen)
 +
 +* cluster: add graceful disconnect support (Andreas Madsen)
 +
 +* child_process: Separate 'close' event from 'exit' (Charlie McConnell)
 +
 +* typed arrays: add Uint8ClampedArray (Mikael Bourges-Sevenier)
 +
 +* buffer: Fix byte alignment issues (Ben Noordhuis, Erik Lundin)
 +
 +* tls: fix CryptoStream.setKeepAlive() (Shigeki Ohtsu)
 +
 +* Expose http parse error codes (Felix Geisendörfer)
 +
 +* events: don't delete the listeners array (Ben Noordhuis, Nathan Rajlich)
 +
 +* process: add process.config to view node's ./configure settings (Nathan Rajlich)
 +
 +* process: process.execArgv to see node's arguments (Micheil Smith)
 +
 +* process: fix process.title setter (Ben Noordhuis)
 +
 +* timers: handle negative or non-numeric timeout values (Ben Noordhuis)
 +
 +
 +2012.03.13, Version 0.7.6 (unstable), f06abda6f58e517349d1b63a2cbf5a8d04a03505
 +
 +* Upgrade v8 to 3.9.17
 +
 +* Upgrade npm to 1.1.8
 +  - Add support for os/cpu fields in package.json (Adam Blackburn)
 +  - Automatically node-gyp packages containing a binding.gyp
 +  - Fix failures unpacking in UNC shares
 +  - Never create un-listable directories
 +  - Handle cases where an optionalDependency fails to build
 +
 +* events: newListener emit correct fn when using 'once' (Roly Fentanes)
 +
 +* url: Ignore empty port component (Łukasz Walukiewicz)
 +
 +* module: replace 'children' array (isaacs)
 +
 +* tls: parse multiple values of a key in ssl certificate (Sambasiva Suda)
 +
 +* cluster: support passing of named pipes (Ben Noordhuis)
 +
 +* Windows: include syscall in fs errors (Bert Belder)
 +
 +* http: #2888 Emit end event only once (Igor Zinkovsky)
 +
 +* readline: add multiline support (Rlidwka)
 +
 +* process: add `process.hrtime()` (Nathan Rajlich)
 +
 +* net, http, https: add localAddress option (Dmitry Nizovtsev)
 +
 +* addon improvements (Nathan Rajlich)
 +
 +* build improvements (Ben Noordhuis, Sadique Ali, T.C. Hollingsworth, Nathan Rajlich)
 +
 +* add support for "SEARCH" request methods (Nathan Rajlich)
 +
 +* expose the zlib and http_parser version in process.versions (Nathan Rajlich)
 +
 +
 +2012.02.23, Version 0.7.5 (unstable), d384b8b0d2ab7f05465f0a3e15fe20b4e25b5f86
 +
 +* startup speed improvements (Maciej Małecki)
 +
 +* crypto: add function getDiffieHellman() (Tomasz Buchert)
 +
 +* buffer: support decoding of URL-safe base64 (Ben Noordhuis)
 +
 +* Make QueryString.parse() even faster (Brian White)
 +
 +* url: decode url entities in auth section (Ben Noordhuis)
 +
 +* http: support PURGE request method (Ben Noordhuis)
 +
 +* http: Generate Date headers on responses (Mark Nottingham)
 +
 +* Fix #2762: Add callback to close function. (Mikeal Rogers)
 +
 +* dgram: fix out-of-bound memory read (Ben Noordhuis)
 +
 +* repl: add automatic loading of built-in libs (Brandon Benvie)
 +
 +* repl: remove double calls where possible (Fedor Indutny)
 +
 +* Readline improvements. Related: #2737 #2756 (Colton Baker)
 +
 +* build: disable -fomit-frame-pointer on solaris (Dave Pacheco)
 +
 +* build: arch detection improvements (Nathan Rajlich)
 +
 +* build: Make a fat binary for the OS X `make pkg`. (Nathan Rajlich)
 +
 +* jslint src/ and lib/ on 'make test' (isaacs)
 +
 +
 +
 +2012.02.14, Version 0.7.4 (unstable), de21de920cf93ec40736ada3792a7f85f3eadeda
 +
 +* Upgrade V8 to 3.9.5
 +
 +* Upgrade npm to 1.1.1
 +
 +* build: Detect host_arch better (Karl Skomski)
 +
 +* debugger: export `debug_port` to `process` (Fedor Indutny)
 +
 +* api docs: CSS bug fixes (isaacs)
 +
 +* build: use -fPIC for native addons on UNIX (Nathan Rajlich)
 +
 +* Re-add top-level v8::Locker (Marcel Laverdet)
 +
 +* Move images out of the dist tarballs (isaacs)
 +
 +* libuv: Remove uv_export and uv_import (Ben Noordhuis)
 +
 +* build: Support x64 build on Windows (Igor Zinkovsky)
 +
 +
 +2012.02.07, Version 0.7.3 (unstable), 99059aad8d654acda4abcfaa68df182b50f2ec90
 +
 +* Upgrade V8 to 3.9.2
 +
 +* Revert support for isolates. (Ben Noordhuis)
 +
 +* cluster: Cleanup docs, event handling, and process.disconnect (Andreas Madsen)
 +
 +* gyp_addon: link with node.lib on Windows (Nathan Rajlich)
 +
 +* http: fix case where http-parser is freed twice (koichik)
 +
 +* Windows: disable RTTI and exceptions (Bert Belder)
 +
 +
 +2012.02.01, Version 0.7.2 (unstable), ec79acb3a6166e30f0bf271fbbfda1fb575b3321
 +
 +* Update V8 to 3.8.9
 +
 +* Support for sharing streams across Isolates (Igor Zinkovsky)
 +
 +* #2636 - Fix case where http_parsers are freed too early (koichik)
 +
 +* url: Support for IPv6 addresses in URLs (Łukasz Walukiewicz)
 +
 +* child_process: Add disconnect() method to child processes (Andreas Madsen)
 +
 +* fs: add O_EXCL support, exclusive open file (Ben Noordhuis)
 +
 +* fs: more specific error messages (Tj Holowaychuk)
 +
 +* tty: emit 'unknown' key event if key sequence not found (Dan VerWeire, Nathan Rajlich)
 +
 +* build: compile release build too if BUILDTYPE=Debug (Ben Noordhuis)
 +
 +* module: fix --debug-brk on symlinked scripts (Fedor Indutny)
 +
 +* zlib: fix `Failed to set dictionary` issue (Fedor Indutny)
 +
 +* waf: predict target arch for OS X (Fedor Indutny)
 +
 +
 +2012.01.23, Version 0.7.1 (unstable), a74354735ab5d5b0fa35a1e4ff7e653757d2069b
 +
 +* Update V8 to 3.8.8
 +
 +* Install node-waf by default (Fedor Indutny)
 +
 +* crypto: Add ability to turn off PKCS padding (Ingmar Runge)
 +
 +* v8: implement VirtualMemory class on SunOS (Ben Noordhuis)
 +
 +* Add cluster.setupMaster (Andreas Madsen)
 +
 +* move `path.exists*` to `fs.exists*` (Maciej Małecki)
 +
 +* typed arrays: set class name (Ben Noordhuis)
 +
 +* libuv bug fixes (Igor Zinkovsky, Ben Noordhuis, Dan VerWeire)
 +
 +
 +2012.01.16, Version 0.7.0 (unstable), 9cc55dca6f67a6096c858b841c677b0593404321
 +
 +* Upgrade V8 to 3.8.6
 +
 +* Use GYP build system on unix (Ben Noordhuis)
 +
 +* Experimenetal isolates support (Ben Noordhuis)
 +
 +* Improvements to Cluster API (Andreas Madsen)
 +
 +* Use isolates for internal debugger (Fedor Indutny)
 +
 +* Bug fixes
 +
 +
++2012.05.15 Version 0.6.18 (stable), 4bc1d395de6abed2cf1e4d0b7b3a1480a21c368f
+ * windows: skip GetFileAttributes call when opening a file (Bert Belder)
+ * crypto: add PKCS12/PFX support (Sambasiva Suda)
+ * #3240: child_process: delete NODE_CHANNEL_FD from env in spawn (Ben Noordhuis)
+ * windows: add test for path.normalize with UNC paths (Bert Belder)
+ * windows: make path.normalize convert all slashes to backslashes (Bert Belder)
+ * fs: Automatically close FSWatcher on error (Bert Belder)
+ * #3258: fs.ReadStream.pause() emits duplicate data event (koichik)
+ * pipe_wrap: don't assert() on pipe accept errors (Ben Noordhuis)
+ * Better exception output for module load and process.nextTick (Felix Geisendörfer)
+ * zlib: fix error reporting (Ben Noordhuis)
+ * http: Don't destroy on timeout (isaacs)
+ * #3231: http: Don't try to emit error on a null'ed req object (isaacs)
+ * #3236: http: Refactor ClientRequest.onSocket (isaacs)
  2012.05.04 Version 0.6.17 (stable), 4ced23deaf36493f4303a18f6fdce768c58becc0
  
  * Upgrade npm to 1.1.21
diff --cc Makefile
Simple merge
Simple merge
@@@ -14,12 -14,12 +14,13 @@@ It also offers a set of wrappers for Op
  
  Creates a credentials object, with the optional details being a dictionary with keys:
  
 -* `key` : a string holding the PEM encoded private key
 -* `cert` : a string holding the PEM encoded certificate
+ * `pfx` : A string or buffer holding the PFX or PKCS12 encoded private key, certificate and CA certificates
- * `passphrase` : A string of passphrase for the private key
 +* `key` : A string holding the PEM encoded private key
 -* `ca` : either a string or list of strings of PEM encoded CA certificates to trust.
 -* `ciphers`: a string describing the ciphers to use or exclude. Consult
+ * `passphrase` : A string of passphrase for the private key or pfx
 +* `cert` : A string holding the PEM encoded certificate
 +* `ca` : Either a string or list of strings of PEM encoded CA certificates to trust.
 +* `crl` : Either a string or list of strings of PEM encoded CRLs (Certificate Revocation List)
 +* `ciphers`: A string describing the ciphers to use or exclude. Consult
    <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT> for details
    on the format.
  
Simple merge
Simple merge
@@@ -162,21 -181,14 +199,24 @@@ You can test this server by connecting 
      openssl s_client -connect 127.0.0.1:8000
  
  
 +## tls.connect(options, [secureConnectListener])
  ## tls.connect(port, [host], [options], [secureConnectListener])
  
 -Creates a new client connection to the given `port` and `host`. (If `host`
 -defaults to `localhost`.) `options` should be an object which specifies
 +Creates a new client connection to the given `port` and `host` (old API) or
 +`options.port` and `options.host`. (If `host` is omitted, it defaults to
 +`localhost`.) `options` should be an object which specifies:
 +
 +  - `host`: Host the client should connect to
 +
 +  - `port`: Port the client should connect to
 +
 +  - `socket`: Establish secure connection on a given socket rather than
 +    creating a new socket. If this option is specified, `host` and `port`
 +    are ignored.
  
+   - `pfx`: A string or `Buffer` containing the private key, certificate and
+     CA certs of the server in PFX or PKCS12 format.
    - `key`: A string or `Buffer` containing the private key of the client in
      PEM format.
  
diff --cc lib/crypto.js
Simple merge
diff --cc lib/fs.js
Simple merge
diff --cc lib/http.js
@@@ -1315,6 -1197,6 +1315,7 @@@ function socketErrorListener(err) 
    socket.destroy();
  }
  
++
  function responseOnEnd() {
    var req = this.req;
    var socket = req.socket;
@@@ -1397,7 -1279,7 +1398,6 @@@ function socketOnEnd() 
    socket.destroy();
  }
  
--
  function socketOnData(d, start, end) {
    var socket = this;
    var req = this._httpMessage;
@@@ -1451,17 -1333,8 +1451,16 @@@ ClientRequest.prototype.onSocket = func
      parser.incoming = null;
      req.parser = parser;
  
 +    // Propagate headers limit from request object to parser
 +    if (typeof req.maxHeadersCount === 'number') {
 +      parser.maxHeaderPairs = req.maxHeadersCount << 1;
 +    } else {
 +      // Set default value because parser may be reused from FreeList
 +      parser.maxHeaderPairs = 2000;
 +    }
 +
      socket._httpMessage = req;
  
      // Setup "drain" propogation.
      httpSocketSetup(socket);
      socket.ondata = socketOnData;
diff --cc lib/path.js
Simple merge
diff --cc lib/tls.js
Simple merge
diff --cc src/node.js
Simple merge
Simple merge
  #include <openssl/x509v3.h>
  #include <openssl/hmac.h>
  #include <openssl/rand.h>
+ #include <openssl/pkcs12.h>
  
  #ifdef OPENSSL_NPN_NEGOTIATED
 -#include <node_buffer.h>
 +#include "node_buffer.h"
  #endif
  
  #define EVP_F_EVP_DECRYPTFINAL 101
Simple merge
Simple merge
Simple merge