Browse Source

test: fix test-crypto-stream.js

A recent merge of v0.10 to v0.12
(0c7f6ca830) upgraded OpenSSL to version
1.0.1j. In v0.10, this required test-crypto-stream.js to be fixed with
commit 707cc25011. 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 26a1b712ec
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>
v0.11.15-release
Julien Gilli 10 years ago
parent
commit
ae00e97ef2
  1. 2
      test/simple/test-crypto-stream.js

2
test/simple/test-crypto-stream.js

@ -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.

Loading…
Cancel
Save