Commit Graph

7090 Commits (cc1b09d6b7c3cc6b8729804cbf644634ba5d0815)

Author SHA1 Message Date
Bryan Cantrill cc1b09d6b7 test: add tests for postmortem and DTrace support 2012-09-21 01:51:57 +02:00
Ben Noordhuis bbf6b4ecbb configure: turn on VFPv3 on ARMv7
Fixes a V8 build error caused by missing arm_fpu and arm_neon settings.
2012-09-19 14:38:25 +02:00
Ben Noordhuis c4aedf8a2a doc: zlib: document flush() and reset() methods 2012-09-19 13:22:29 +02:00
Fedor Indutny 63ff449d87 crypto: bring module into modern age
Introduce 'buffer' encoding, allow returning and giving buffers as
arguments of 'crypto' routines.

Fix #3278
2012-09-18 10:58:37 +04:00
Fedor Indutny 3301c90ff7 authors: add @tasogarepg to AUTHORS 2012-09-18 10:57:59 +04:00
tasogarepg 21c4b9a9eb debugger: fix --debug-brk 2012-09-18 10:56:37 +04:00
isaacs d406a8250f Now working on v0.9.3 2012-09-17 18:34:48 -07:00
isaacs 7fcb7b4d9c Merge branch 'v0.9.2-release' 2012-09-17 18:34:31 -07:00
isaacs 6e20558890 2012.09.17, Version 0.9.2 (Unstable)
* http_parser: upgrade to ad3b631

* openssl: upgrade 1.0.1c

* darwin: use FSEvents to watch directory changes (Fedor Indutny)

* unix: support missing API on NetBSD (Shigeki Ohtsu)

* unix: fix EMFILE busy loop (Ben Noordhuis)

* windows: un-break writable tty handles (Bert Belder)

* windows: map WSAESHUTDOWN to UV_EPIPE (Bert Belder)

* windows: make spawn with custom environment work again (Bert Belder)

* windows: map ERROR_DIRECTORY to UV_ENOENT (Bert Belder)

* tls, https: validate server certificate by default (Ben Noordhuis)

* tls, https: throw exception on missing key/cert (Ben Noordhuis)

* tls: async session storage (Fedor Indutny)

* installer: don't install header files (Ben Noordhuis)

* buffer: implement Buffer.prototype.toJSON() (Nathan Rajlich)

* buffer: added support for writing NaN and Infinity (koichik)

* http: make http.ServerResponse emit 'end' (Ben Noordhuis)

* build: ./configure --ninja (Ben Noordhuis, Timothy J Fontaine)

* installer: fix --without-npm (Ben Noordhuis)

* cli: make -p equivalent to -pe (Ben Noordhuis)

* url: Go much faster by using Url class (isaacs)
2012-09-17 17:54:59 -07:00
Bert Belder 9423aa995b openssl: fix the Windows x64 build 2012-09-17 17:54:59 -07:00
isaacs 22974a1acd openssl: Set flags to properly build on sunos 2012-09-17 17:54:59 -07:00
Bert Belder 90a625399f openssl: fix the Windows x64 build 2012-09-18 02:13:29 +02:00
isaacs 1510116337 test: fs.watch filename support on Darwin 2012-09-17 15:49:07 -07:00
isaacs b788c5e77b uv: Upgrade to 778144f0
joyent/libuv@778144f0b5
2012-09-17 15:36:15 -07:00
Alex Xu fb6c314b6d configure: always use shlex instead of split
Use shlex module instead of builtin string split to parse CC.
2012-09-17 22:59:42 +02:00
isaacs 7144be70db url: Go much faster by using Url class
V8 loves it when JavaScript pretends to be a Classic inheritance
type of language.

Before:

$ ./node benchmark/url.js
benchmarking parse() ... 1.868 sec
benchmarking format() ... 1.906 sec
benchmarking resolve("../foo/bar?baz=boom") ... 7.800 sec
benchmarking resolve("foo/bar") ... 7.099 sec
benchmarking resolve("http://nodejs.org") ... 8.403 sec
benchmarking resolve("./foo/bar?baz") ... 7.974 sec

After:

$ ./node benchmark/url.js
benchmarking parse() ... 1.769 sec
benchmarking format() ... 1.793 sec
benchmarking resolve("../foo/bar?baz=boom") ... 4.254 sec
benchmarking resolve("foo/bar") ... 3.932 sec
benchmarking resolve("http://nodejs.org") ... 4.382 sec
benchmarking resolve("./foo/bar?baz") ... 4.293 sec
2012-09-17 10:44:23 -07:00
Ben Noordhuis 3806cf0d64 test: set rejectUnauthorized in tls/https tests
Update the tls and https tests to explicitly set rejectUnauthorized instead of
relying on the NODE_TLS_REJECT_UNAUTHORIZED environment variable getting set.
2012-09-15 00:19:30 +02:00
Ben Noordhuis 35607f3a2d tls, https: validate server certificate by default
This commit changes the default value of the rejectUnauthorized option from
false to true.

What that means is that tls.connect(), https.get() and https.request() will
reject invalid server certificates from now on, including self-signed
certificates.

There is an escape hatch: if you set the NODE_TLS_REJECT_UNAUTHORIZED
environment variable to the literal string "0", node.js reverts to its
old behavior.

Fixes #3949.
2012-09-15 00:19:06 +02:00
Bert Belder 4c171a504d uv: upgrade to 3d9de13 2012-09-14 04:00:30 +02:00
Bert Belder d908b83f59 uv: upgrade to a28f145 2012-09-14 02:56:41 +02:00
Pavel Lang 7ab4a77d6f buffer: update constructor prototype
Change Buffer::New(char*, size_t) to Buffer::New(const char*, size_t).
2012-09-13 16:31:04 +02:00
Ben Noordhuis bec863b7de crypto: use uv_thread_self() 2012-09-13 16:20:36 +02:00
Ben Noordhuis dd1b947706 deps: upgrade libuv to 1f9bd99 2012-09-13 16:18:54 +02:00
Ben Noordhuis 2c97da82f5 bench: correct time calculation in url.js 2012-09-13 14:02:22 +02:00
Shigeki Ohtsu 1bcf29ef33 openssl: disable EC_NISTP_64_GCC_128 on ia32
uint128_t won't work on 32-bit platform

Closes #4008.
2012-09-12 20:51:40 -07:00
Ben Noordhuis 10ba95c11a bench: improve url parser benchmark 2012-09-13 01:21:54 +02:00
Felix Böhm f5c68b280f bench: add url parser benchmark 2012-09-13 01:21:53 +02:00
isaacs bb207c2827 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	ChangeLog
	src/node_version.h
	test/simple/test-util-inspect.js
2012-09-12 15:13:07 -07:00
Frédéric Germain 451ff1540a http: Remove timeout handler when data arrives 2012-09-12 09:50:06 -07:00
Ben Noordhuis d3fa0dcb89 openssl: disable harmless compiler warnings
Compile with -Wno-missing-field-initializers and -Wno-old-style-declaration.
The warnings are harmless but they clutter the build output a great deal.
2012-09-12 17:57:22 +02:00
Ben Noordhuis 58a5bc1ec7 doc: fs: clarfify fs.watch() documentation
fs.watch() is implemented on all supported platforms but, depending on the
object being watched, doesn't always work reliably (or at all).

Fixes #4005.
2012-09-12 17:08:32 +02:00
Bert Belder 4b8721aad0 openssl: remove obsolete patch files
These patches were provided by Android and Chromium. In this form they
are not useful. The ones that we need are landed as separate commits.

As of openssl 1.0.1c, three of them made it upstream:
  * npn.patch (Next Protocol Negotiation support)
  * tls_exporter.patch (RFC 5705 Keying Material Exporters for TLS)
  * openssl_no_dtls1.patch (minor bugfix)
2012-09-12 05:24:03 +02:00
Bert Belder 8d082d0f88 openssl: update the GYP build to work with openssl 1.0.1c 2012-09-12 05:24:01 +02:00
Bert Belder c4b9be7c5a openssl: replace symlinks by #include shims
Git for Windows can't create symlinks. This works too.
2012-09-12 05:23:59 +02:00
Bert Belder 709e935239 openssl: use dummy OPENSSL_cpuid_setup function
Use a empty implementation for function OPENSSL_cpuid_setup to resolve link
error. We should figure out how to geenrate platform specific implementation
of OPENSSL_cpuid_setup by leveraging crypto/*cpuid.pl.

This patch is taken from Chromium.
2012-09-12 05:23:58 +02:00
Bert Belder 9fc84fdad9 openssl: don't read user input from the TTY 2012-09-12 05:23:56 +02:00
Ben Noordhuis 988a164cd8 openssl: fix uninitialized memory access
ASN1_STRING_to_UTF8() passes an ASN1_STRING to ASN1_STRING_set() but
forgot to initialize the `length` field.

Fixes the following valgrind error:

  $ valgrind -q --track-origins=yes --num-callers=19 \
      out/Debug/node test/simple/test-tls-client-abort.js
  ==2690== Conditional jump or move depends on uninitialised value(s)
  ==2690==    at 0x784B69: ASN1_STRING_set (asn1_lib.c:382)
  ==2690==    by 0x809564: ASN1_mbstring_ncopy (a_mbstr.c:204)
  ==2690==    by 0x8090F0: ASN1_mbstring_copy (a_mbstr.c:86)
  ==2690==    by 0x782F1F: ASN1_STRING_to_UTF8 (a_strex.c:570)
  ==2690==    by 0x78F090: asn1_string_canon (x_name.c:409)
  ==2690==    by 0x78EF17: x509_name_canon (x_name.c:354)
  ==2690==    by 0x78EA7D: x509_name_ex_d2i (x_name.c:210)
  ==2690==    by 0x788058: ASN1_item_ex_d2i (tasn_dec.c:239)
  ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
  ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
  ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
  ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
  ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
  ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
  ==2690==    by 0x787C93: ASN1_item_d2i (tasn_dec.c:136)
  ==2690==    by 0x78F5E4: d2i_X509 (x_x509.c:141)
  ==2690==    by 0x7C9B91: PEM_ASN1_read_bio (pem_oth.c:81)
  ==2690==    by 0x7CA506: PEM_read_bio_X509 (pem_x509.c:67)
  ==2690==    by 0x703C9A: node::crypto::SecureContext::AddRootCerts(v8::Arguments const&) (node_crypto.cc:497)
  ==2690==  Uninitialised value was created by a stack allocation
  ==2690==    at 0x782E89: ASN1_STRING_to_UTF8 (a_strex.c:560)
2012-09-12 05:23:54 +02:00
Bert Belder c23ac14cba openssl: backward compatibility after x509 hash function change
There are many symbolic links under /etc/ssl/certs created by using hash of
the pem certificates in order for OpenSSL to find those certificate.
Openssl has a tool to help you create hash symbolic links. (See tools/c_rehash)
However the new openssl changed the hash algorithm, Unless you compile/install
the latest openssl library and re-create all related symbolic links, the new
openssl can not find some certificates because the links of those certificates
were created by using old hash algorithm, which causes some tests failed.

This patch gives a way to find a certificate according to its hash by using both
new algorithm and old algorithm.

crbug.com/111045 is used to track this issue.

This patch is taken from the Chromium project.
2012-09-12 05:23:52 +02:00
Ben Noordhuis 2fad7a8c1b openssl: apply upstream sha1-armv4-large.pl patch
This is a back-port of r22768: sha1-armv4-large.pl: comply with ABI.
2012-09-12 05:23:51 +02:00
Bert Belder 1d9b4ace8a openssl: support handshake cut-through
Enables SSL3+ clients to send application data immediately following the
Finished message even when negotiating full-handshakes.  With this patch,
clients can negotiate SSL connections in 1-RTT even when performing
full-handshakes.

This patch is taken from the Android Open Source Project.
2012-09-12 05:23:49 +02:00
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
Ben Noordhuis 4870a4e3da doc: http: expand request.headers documentation 2012-09-12 02:46:53 +02:00
Bert Belder b61ae54e18 openssl: upgrade to vanilla openssl 1.0.1c 2012-09-12 00:40:55 +02:00
isaacs 362189a5d3 Now working on 0.8.10 2012-09-11 11:59:37 -07:00
isaacs d80de98e91 blog: Post for 0.8.9 2012-09-11 11:59:10 -07:00
isaacs 72d3124841 Merge branch 'v0.8.9-release' into v0.8 2012-09-11 11:58:35 -07:00
isaacs b88c3902b2 2012.09.11, Version 0.8.9 (Stable)
* v8: upgrade to 3.11.10.22

* GYP: upgrade to r1477

* npm: Upgrade to 1.1.61

* npm: Don't create world-writable files (isaacs)

* windows: fix single-accept mode for shared server sockets (Bert Belder)

* windows: fix uninitialized memory access in uv_update_time() (Bert Belder)

* windows: don't throw when a signal handler is attached (Bert Belder)

* unix: fix memory leak in udp (Ben Noordhuis)

* unix: map errno ESPIPE (Ben Noordhuis)

* unix, windows: fix memory corruption in fs-poll.c (Ben Noordhuis)

* sunos: fix os.cpus() on x86_64 (Ben Noordhuis)

* child process: fix processes with IPC channel don't emit 'close' (Bert Belder)

* build: add a "--dest-os" option to force a gyp "flavor" (Nathan Rajlich)

* build: set `process.platform` to "sunos" on SunOS (Nathan Rajlich)

* build: fix `make -j` fails after `make clean` (Bearice Ren)

* build: fix openssl configuration for "arm" builds (Nathan Rajlich)

* tls: support unix domain socket/named pipe in tls.connect (Shigeki Ohtsu)

* https: make https.get() accept a URL (koichik)

* http: respect HTTP/1.0 TE header (Ben Noordhuis)

* crypto, tls: Domainify setSNICallback, pbkdf2, randomBytes (Ben Noordhuis)

* stream.pipe: Don't call destroy() unless it's a function (isaacs)
2012-09-11 11:08:07 -07:00
isaacs 1c2982b94f Update doc and test for sunos/solaris switch 2012-09-11 10:57:25 -07: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
isaacs 6e0b8b169c doc: Fork me image should be full url 2012-09-11 08:45:25 -07:00