Skip to content

Commit

Permalink
test: fix test-crypto-stream.js
Browse files Browse the repository at this point in the history
A recent merge of v0.10 to v0.12
(0c7f6ca) upgraded OpenSSL to version
1.0.1j. In v0.10, this required test-crypto-stream.js to be fixed with
commit 707cc25. Basically, instead of
returning the proper error, Err_get_error() would return 0 and the test
for the error message needed to be updated in test-crypto-stream.js.

However, in the v0.12 branch, crypto error messages are handled a bit
differently since commit 26a1b71
landed. Instead of returning the default OpenSSL error message, it makes
the decipher stream return a default message specific to Node.js.

This commit updates test-crypto-stream.js to test the error object
against the proper default error message.

Fixes #9019.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
Julien Gilli committed Jan 15, 2015
1 parent 85360f0 commit ae00e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/simple/test-crypto-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var key = new Buffer('48fb56eb10ffeb13fc0ef551bbca3b1b', 'hex'),

cipher.pipe(decipher)
.on('error', common.mustCall(function end(err) {
assert(/:00000000:/.test(err));
assert(/Unsupported/.test(err));
}));

cipher.end('Papaya!'); // Should not cause an unhandled exception.

0 comments on commit ae00e97

Please sign in to comment.