0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
Commit Graph

71 Commits

Author SHA1 Message Date
Ben Noordhuis
0330bdf519 lib: macro-ify type checks
Increases the grep factor. Makes it easier to harmonize type checks
across the code base.
2013-07-24 21:49:35 +02:00
Nathan Rajlich
48e159faf2 crypto: throw a helpful error message for "tls" and "crypto"
When node is compiled with the --without-ssl flag.
2013-07-09 11:27:38 -07:00
isaacs
adf9b67e59 Merge remote-tracking branch 'ry/v0.10' into master
Conflicts:
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	deps/v8/build/common.gypi
	deps/v8/src/frames.h
	deps/v8/src/runtime.cc
	deps/v8/test/mjsunit/debug-set-variable-value.js
	lib/http.js
	src/node_version.h
2013-06-25 11:12:33 -07:00
Ben Noordhuis
82b3524bce crypto: fix utf8/utf-8 encoding check
Normalize the encoding in getEncoding() before using it. Fixes a
"AssertionError: Cannot change encoding" exception when the caller
mixes "utf8" and "utf-8".

Fixes #5655.
2013-06-11 13:07:24 +02:00
isaacs
61c9f78c63 Merge remote-tracking branch 'ry/v0.10' into master
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/config-unix.mk
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	deps/uv/uv.gyp
	src/node.cc
	src/node_buffer.cc
	src/node_crypto.cc
	src/node_version.h
	src/stream_wrap.cc
	src/stream_wrap.h
2013-05-17 14:04:54 -07:00
isaacs
a241deb19a crypto: Pass encodings for Hmac digest 2013-05-14 13:51:43 -07:00
isaacs
430dc39e87 crypto: use StringBytes::Encode 2013-05-14 13:51:43 -07:00
isaacs
a1eacdf12a crypto: Pass strings to binding layer directly 2013-05-14 13:51:43 -07:00
Ben Noordhuis
af1ed99ce2 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/src/version.c
	lib/http.js
	src/node_crypto.cc
	src/node_os.cc
	src/node_version.h
	test/simple/helper-debugger-repl.js
2013-04-29 14:08:51 +02:00
isaacs
4bf1d1007f crypto: LazyTransform on properties, not methods
It needs to apply the Transform class when the _readableState,
_writableState, or _transformState properties are accessed,
otherwise things like setEncoding and on('data') don't work
properly.

Also, the methods wrappers are no longer needed, since they're only
problematic because they access the undefined properties.
2013-04-21 09:33:10 -04:00
Fedor Indutny
259839fe75 Merge branch 'v0.10'
Conflicts:
	ChangeLog
	deps/uv/src/version.c
	src/node.h
	src/node_crypto.cc
	src/node_crypto_bio.cc
	src/node_crypto_bio.h
	src/node_object_wrap.h
	src/node_version.h
2013-04-12 11:30:11 -04:00
Andreas Madsen
fed8cff1d0 crypto: fix constructor call in crypto streams
When using some stream method on a lazy crypto stream, the transform
constructor wasn't called. This caused the internal state object to
be undefined.
2013-04-08 14:45:42 +04:00
isaacs
2c9a38d059 Merge remote-tracking branch 'ry/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/v8/src/json-parser.h
	lib/crypto.js
	src/node_version.h
2013-04-05 09:02:48 -07:00
isaacs
7af075ee30 crypto: Pass options to ctor calls 2013-03-29 09:39:51 -07:00
Ben Noordhuis
1a65154d72 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	deps/v8/src/objects-inl.h
	deps/v8/src/objects.h
	src/node_crypto.cc
2013-03-26 00:27:23 +01:00
Ben Noordhuis
cfd0dca9ae crypto: make getCiphers() return non-SSL ciphers
Commit f53441a added crypto.getCiphers() as a function that returns the
names of SSL ciphers.

Commit 14a6c4e then added crypto.getHashes(), which returns the names of
digest algorithms, but that creates a subtle inconsistency: the return
values of crypto.getHashes() are valid arguments to crypto.createHash()
but that is not true for crypto.getCiphers() - the returned values are
only valid for SSL/TLS functions.

Rectify that by adding tls.getCiphers() and making crypto.getCiphers()
return proper cipher names.
2013-03-25 18:42:07 +01:00
isaacs
2f88272ba2 Merge remote-tracking branch 'ry/v0.10' into master
Conflicts:
	src/node.cc
	src/node_version.h
2013-03-21 10:52:01 -07:00
Fedor Indutny
855caa82aa crypto: initialize transform lazily 2013-03-20 16:49:08 -07:00
Fedor Indutny
83d17e509f crypto: merge Cipher and Decipher 2013-03-13 00:23:29 +04:00
isaacs
426b4c6258 stream: _write takes an encoding argument
This vastly reduces the overhead of decodeStrings:false streams,
such as net and http.
2013-03-05 14:27:15 -08:00
isaacs
cd68d86c32 stream: Remove output function from _transform
Just use stream.push(outputChunk) instead.
2013-03-05 14:27:15 -08:00
Ben Noordhuis
4231dab39f crypto: fix base64 padding regression
Commit 9901b69c introduces a small regression where the trailing base64
padding is no longer written out when Cipher#final is called. Rectify
that.

Fixes #4837.
2013-02-25 15:21:52 +01:00
isaacs
dd3ebb8cf6 crypto: Streaming interface for Sign and Verify 2012-12-14 10:52:27 -08:00
isaacs
e336134658 crypto: Streaming interface for cipher/decipher/iv 2012-12-14 10:52:27 -08:00
isaacs
175f78c6ba crypto: Streaming api for Hmac 2012-12-14 10:52:27 -08:00
isaacs
90de2ddb77 crypto: Streaming interface for Hash 2012-12-14 10:52:26 -08:00
isaacs
d7da20c812 crypto: pbkdf2 throws when no callback provided 2012-10-23 10:48:51 -07:00
isaacs
c87b524c5f crypto: Clean up buffer handling and DH methods 2012-10-23 10:48:51 -07:00
isaacs
76b0bdf720 crypto: Add crypto.DEFAULT_ENCODING (defaults to 'buffer')
This is a flag to make it easier for users to upgrade through the
breaking crypto change, and easier for us to switch it back if it's a
problem.

Explicitly set default encoding to 'buffer' in other tests, in case it
ever changes back.
2012-10-23 10:48:51 -07:00
isaacs
bfb9d5bbe6 crypto: Binding only accepts buffers 2012-10-23 10:48:50 -07:00
isaacs
9901b69c8e crypto: Move encoding logic to JS, default=buffer
crypto: Hash and Hmac default to buffers

crypto: Move Cipher encoding logic to JS

crypto: Move Cipheriv encoding logic to JS

crypto: Move Decipher encoding logic to JS

crypto: Move Decipheriv into JS, default to buffers

crypto: Move Sign class to JS

crypto: Better encoding handling in Hash.update

crypto: Move Verify class to JS

crypto: Move DiffieHellman to JS, default to buffers

crypto: Move DiffieHellmanGroup to JS, default to buffers

Also, create a test for this feature
2012-10-23 10:22:42 -07:00
Ben Noordhuis
2fbf0612a1 crypto: sort return value of getCiphers/getHashes 2012-10-13 02:55:17 +02:00
Ben Noordhuis
14a6c4efb8 crypto: add crypto.getHashes() 2012-10-13 02:55:14 +02:00
Ben Noordhuis
f53441ab1f crypto: add crypto.getCiphers()
Returns a list of, unsurprisingly, the available ciphers.
2012-10-13 01:49:57 +02:00
isaacs
5164ae3838 Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
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
2012-05-15 11:37:34 -07:00
ssuda
fb7348ae06 crypto: add PKCS12/PFX support
Fixes #2845.
2012-05-14 17:12:59 +02:00
Tomasz Buchert
c6a04ce78f crypto: add function getDiffieHellman()
Returns a well known, predefined RFC group.
2012-02-21 14:07:25 +01:00
koichik
f53d092a2a tls, https: add passphrase option
Fixes #1925.
2011-10-31 17:36:43 +09:00
koichik
19a855382c tls: requestCert unusable with Firefox and Chrome
Fixes #1516.
2011-10-15 00:54:46 +09:00
Colton Baker
87286cc737 Fixed a lot of jslint errors.
Fixes #1831
2011-10-05 18:51:06 -07:00
Ben Noordhuis
c4eaf7e5a9 crypto: implement randomBytes() and pseudoRandomBytes() 2011-09-27 20:27:53 +02:00
Glen Low
04122ad2d3 crypto: PBKDF2 function from OpenSSL 2011-08-12 16:23:11 +02:00
Ryan Dahl
6d5218bc7d Merge branch 'v0.4'
Conflicts:
	doc/api/crypto.markdown
	doc/api/modules.markdown
	src/platform_win32.cc
2011-08-01 21:52:03 -07:00
koichik
d32971a8cb Doc improvements and change argument name.
Fixes #1318.
2011-07-25 23:57:25 +09:00
Ryan Dahl
59274e8a33 Merge branch 'v0.4'
Conflicts:
	lib/crypto.js
	lib/tls.js
2011-05-20 10:29:16 -07:00
Brian White
2de0611b43 Remove unused variable
Fixes #1077
2011-05-20 08:51:55 -07:00
Fedor Indutny
21724ecaec Share SSL context between server connections
Fixes #1073.
2011-05-19 14:45:42 -07:00
Håvard Stranden
9f0b1a9bc6 Add Diffie-Hellman support to crypto module
Fixes #573
2011-05-06 14:36:04 -07:00
Theo Schlossnagle
d6f5b8a2a6 allow setting of ciphers in credentials
fixes #873
2011-04-13 18:35:39 -07:00
Theo Schlossnagle
2a88dd3bc1 TLS: Add secureOptions flag
Also, secureOptions flag was added (and passed through) and allows
the context to have all supported SSL_OP_* set via createCredentials.
All SSL_OP_ flags (outside of ALL) have been added to constants.
2011-04-13 18:25:33 -07:00