Skip to content

Commit 07afafc

Browse files
author
Steven Silvester
authored
workaround for webpack crypto (#6197)
1 parent 76d051e commit 07afafc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

webpack.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
const path = require('path');
2+
const crypto = require('crypto');
3+
4+
// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
5+
// See https://github.com/jupyterlab/jupyterlab/issues/11248
6+
const cryptoOrigCreateHash = crypto.createHash;
7+
crypto.createHash = (algorithm) =>
8+
cryptoOrigCreateHash(algorithm == 'md4' ? 'sha256' : algorithm);
29

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

0 commit comments

Comments
 (0)