Skip to content

Commit

Permalink
Backport PR #6197: Fix crypto handling (#6198)
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Silvester <ssilvester@apple.com>
  • Loading branch information
meeseeksmachine and Steven Silvester committed Oct 8, 2021
1 parent 96b6d54 commit 69f6cbe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
const path = require('path');
const crypto = require('crypto');

// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
// See https://github.com/jupyterlab/jupyterlab/issues/11248
const cryptoOrigCreateHash = crypto.createHash;
crypto.createHash = (algorithm) =>
cryptoOrigCreateHash(algorithm == 'md4' ? 'sha256' : algorithm);

module.exports = {
entry: ['babel-polyfill', '@jupyterlab/apputils/lib/sanitizer'],
Expand Down

0 comments on commit 69f6cbe

Please sign in to comment.