Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running nyc on a FIPS enabled system fails due to use of weak md5 algorithm. #869

Closed
kresss opened this issue Jun 20, 2018 · 1 comment
Closed

Comments

@kresss
Copy link

kresss commented Jun 20, 2018

Expected Behavior

nyc should work on FIPS enabled systems.

Observed Behavior

nyc fails.

$ ./node_modules/.bin/nyc ./node_modules/.bin/mocha "test/init-test-env.js" "test/unit/**/*.js"
crypto.js:81
  this._handle = new binding.Hash(algorithm);

Error: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips
    at new Hash (crypto.js:81:18)
    at Object.createHash (crypto.js:611:10)
    at module.exports (/home/kresss/GIT/wsm/mcs/node_modules/nyc/node_modules/md5-hex/index.js:5:20)
    at NYC.generateUniqueID (/home/kresss/GIT/wsm/mcs/node_modules/nyc/index.js:373:10)
    at new NYC (/home/kresss/GIT/wsm/mcs/node_modules/nyc/index.js:88:47)
    at Object.<anonymous> (/home/kresss/GIT/wsm/mcs/node_modules/nyc/bin/nyc.js:36:14)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)

Bonus Points! Code (or Repository) that Reproduces Issue

Forensic Information

RHEL 7.5 with FIPS enabled at the kernel level.
Node v8.9.4
npm v5.6.0

kresss pushed a commit to kresss/nyc that referenced this issue Jun 20, 2018
@kresss
Copy link
Author

kresss commented Jun 20, 2018

I made an attempt at fixing this. See #870

coreyfarrell added a commit to coreyfarrell/nyc that referenced this issue Jul 5, 2018
This allows nyc to be be used on FIPS systems which have disabled md5.

Fixes istanbuljs#869
@bcoe bcoe closed this as completed in #883 Jul 5, 2018
novemberborn pushed a commit to novemberborn/package-hash that referenced this issue Jan 16, 2019
This is needed for compatibility with systems that have FIPS enabled.
On those systems any call to md5hex throws an exception.

Ref: istanbuljs/nyc#869
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

No branches or pull requests

1 participant