Skip to content

Use SHA1 instead of MD5 - #1

Closed
stefanmb wants to merge 1 commit into
npm:masterfrom
stefanmb:master
Closed

stefanmb wants to merge 1 commit into
npm:masterfrom
stefanmb:master

Conversation

@stefanmb

Copy link
Copy Markdown

I'm trying to use npm with a FIPS build of node and I get the following errors:

340 verbose stack Error: error:060A80A3:digital envelope routines:FIPS_DIGESTINIT:disabled for fips
340 verbose stack     at Error (native)
340 verbose stack     at new Hash (crypto.js:50:18)
340 verbose stack     at Object.Hash (crypto.js:49:12)
340 verbose stack     at module.exports (node.js/fips-bin/lib/node_modules/npm/node_modules/unique-filename/node_modules/unique-slug/index.js:6:23)
340 verbose stack     at module.exports (node.js/fips-bin/lib/node_modules/npm/node_modules/unique-filename/index.js:7:61)
340 verbose stack     at node.js/fips-bin/lib/node_modules/npm/lib/install/actions.js:86:21
340 verbose stack     at Array.map (native)
340 verbose stack     at exports.doParallel (node.js/fips-bin/lib/node_modules/npm/lib/install/actions.js:128:25)
340 verbose stack     at Array.<anonymous> (node.js/fips-bin/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
340 verbose stack     at LOOP (node.js/fips-bin/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)

MD5 is not allowed in FIPS, so I've updated the code to use a truncated version of SHA1 to maintain the 128 bit compatibility.

@stefanmb

stefanmb commented Dec 3, 2015

Copy link
Copy Markdown
Author

@othiym23 @iarna Any thoughts on this commit? Is the truncated SHA1 approach acceptable? Thanks!

@stefanmb

stefanmb commented Dec 4, 2015

Copy link
Copy Markdown
Author

Fixed in f1cd16d Closing this PR.

@stefanmb stefanmb closed this Dec 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant