Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
fe5b710
build: add option to select VS version
greenjava Jan 12, 2016
8bf5b33
crypto: clear error stack in ECDH::Initialize
indutny Jan 14, 2016
0d0a5ed
debugger: remove variable redeclarations
Trott Jan 11, 2016
dcaf6fd
doc: clarify protocol default in http.request()
cjihrig Jan 15, 2016
43dfd03
doc: update branch-diff arguments in release doc
rvagg Jan 14, 2016
01bdafe
doc: fix named anchors in addons.markdown and http.markdown
MichaelTheriot Jan 15, 2016
a6c242f
doc: add path property to Write/ReadStream in fs.markdown
claudiorodriguez Dec 20, 2015
056b078
doc: clarify explanation of first stream section
vccortez Dec 10, 2015
a8330f7
events: make sure console functions exist
Dec 30, 2015
2879395
fs: add autoClose option to fs.createWriteStream
saquibkhan Nov 29, 2015
c171294
http: improves expect header handling
designfrontier Dec 31, 2015
16ef250
tools: enable no-extra-semi rule in eslint
targos Jan 15, 2016
f0ee088
lib,test: remove extra semicolons
targos Jan 15, 2016
c6ac464
querystring: improve parse() performance
mscdex Jan 13, 2016
8104d9d
repl: make sure historyPath is trimmed
evanlucas Jan 5, 2016
6988d2e
src: don't check failure with ERR_peek_error()
bnoordhuis Jan 17, 2016
848b04b
node: allow preload modules with -i
evanlucas Jan 14, 2016
4254508
v8,src: expose statistics about heap spaces
bripkens Dec 29, 2015
f221a43
buffer: make byteLength work with Buffer correctly
JacksonTian Jan 18, 2016
d533364
readline: Remove XXX and output debuglog
kohei-takata Jan 15, 2016
3af206d
src: return UV_EAI_NODATA on empty lookup
cjihrig Jan 15, 2016
399db04
test: fix tls-multi-key race condition
santigimeno Nov 22, 2015
14061c6
buffer: remove unnecessary TODO comments
pgeiss Jan 16, 2016
eb2b8c6
module: cache stat() results more aggressively
bnoordhuis Jan 7, 2016
8f4f5b3
tools: enable space-in-parens ESLint rule
silverwind Jan 19, 2016
a39b28b
test: fix issues for space-in-parens ESLint rule
silverwind Jan 19, 2016
a347cd7
test: make test-cluster-disconnect-leak reliable
Trott Jan 18, 2016
426ff82
stream: prevent object map change in ReadableState
evanlucas Jan 19, 2016
8a11b8c
doc: restore ICU third-party software licenses
richardlau Jan 19, 2016
fe23f42
tools: fix license-builder.sh for ICU
richardlau Jan 19, 2016
a2c257a
src: fix negative values in process.hrtime()
bnoordhuis Jan 19, 2016
dd88256
2016-01-20, Version 5.5.0 (Stable)
evanlucas Jan 20, 2016
2d46ea0
Working on v5.5.1
evanlucas Jan 20, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
crypto: clear error stack in ECDH::Initialize
Clean up OpenSSL error stack in `ECDH::Initialize`, some curves have
faulty implementations that are leaving dangling errors after
initializing the curve.

Fix: #4686
PR-URL: #4689
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
  • Loading branch information
indutny authored and evanlucas committed Jan 18, 2016
commit 8bf5b3301971f21efb50ee663ebc25533373cb90
2 changes: 2 additions & 0 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4678,6 +4678,8 @@ void ECDH::Initialize(Environment* env, Local<Object> target) {
void ECDH::New(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);

MarkPopErrorOnReturn mark_pop_error_on_return;

// TODO(indutny): Support raw curves?
CHECK(args[0]->IsString());
node::Utf8Value curve(env->isolate(), args[0]);
Expand Down
5 changes: 5 additions & 0 deletions test/parallel/test-crypto-dh.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ secret2 = ecdh2.computeSecret(key1, 'binary', 'buffer');

assert.equal(secret1, secret2.toString('base64'));

// Oakley curves do not clean up ERR stack, it was causing unexpected failure
// when accessing other OpenSSL APIs afterwards.
crypto.createECDH('Oakley-EC2N-3');
crypto.createHash('sha256');

// Point formats
assert.equal(ecdh1.getPublicKey('buffer', 'uncompressed')[0], 4);
let firstByte = ecdh1.getPublicKey('buffer', 'compressed')[0];
Expand Down