nodejs with broken crypto module after upgrading to 4.2.4-r0
After upgrading the nodejs package to the latest version (4.2.4-r0), the crypto module throws the following error when calculating a hash:
alpine:~$ node -e "console.log(require('crypto').createHash('md5').update('test').digest('hex'))"
crypto.js:50
this._handle = new binding.Hash(algorithm);
^
Error: error:26078067:engine routines:ENGINE_LIST_ADD:conflicting engine id
at Error (native)
at new Hash (crypto.js:50:18)
at Object.Hash (crypto.js:49:12)
at [eval]:1:31
at Object.exports.runInThisContext (vm.js:54:17)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:435:26)
at node.js:578:27
at doNTCallback0 (node.js:419:9)
at process._tickCallback (node.js:348:13)
Using the previous version (4.2.3-r0) of the package:
alpine:~$ node -e "console.log(require('crypto').createHash('md5').update('test').digest('hex'))"
098f6bcd4621d373cade4e832627b4f6
The above error is also present when using npm:
alpine:~$ npm install express
Error: error:26078067:engine routines:ENGINE_LIST_ADD:conflicting engine id
at Error (native)
at new Hash (crypto.js:50:18)
at Object.Hash (crypto.js:49:12)
at getDefaultSessionIdContext (_tls_wrap.js:27:19)
at _tls_wrap.js:17:33
at NativeModule.compile (node.js:954:5)
at NativeModule.require (node.js:902:18)
at tls.js:221:21
at NativeModule.compile (node.js:954:5)
at NativeModule.require (node.js:902:18)
npm ERR! Linux 4.1.15-2-grsec
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "express"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! error:26078067:engine routines:ENGINE_LIST_ADD:conflicting engine id
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
crypto.js:50
this._handle = new binding.Hash(algorithm);
^
Error: error:2606906E:engine routines:ENGINE_add:internal list error
at Error (native)
at new Hash (crypto.js:50:18)
at Object.Hash (crypto.js:49:12)
at md5hex (/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/index.js:6:21)
at getTmpname (/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/index.js:15:27)
at new WriteStream (/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/index.js:31:22)
at WriteStream (/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/index.js:26:12)
at writeLogFile (/usr/lib/node_modules/npm/lib/utils/error-handler.js:394:14)
at exit (/usr/lib/node_modules/npm/lib/utils/error-handler.js:80:28)
at process.errorHandler (/usr/lib/node_modules/npm/lib/utils/error-handler.js:385:3)
(from redmine: issue id 4999, created on 2016-01-08, closed on 2016-03-18)
- Changesets:
- Revision 351bd62f by Timo Teräs on 2016-01-15T06:18:30Z:
main/nodejs: fix crypto hash error handling
fixes #4999
Upstream regression. Cherry-pick fix from
https://github.com/nodejs/node/issues/4221
- Revision 30beca0f by Timo Teräs on 2016-01-15T06:25:04Z:
main/nodejs: fix crypto hash error handling
fixes #4999
Upstream regression. Cherry-pick fix from
https://github.com/nodejs/node/issues/4221
(cherry picked from commit 351bd62f71d4ca5138e3d4a33c94852f307cf03c)
- Revision 29f1e13e by Natanael Copa on 2016-02-04T14:46:16Z:
main/openssl: remove padlock autoload patch
it appears they made padlock static upstream again
this fixes nodejs issues
ref #4999