Skip to content

Commit 896f56a

Browse files
gtmillsrfrandse
authored andcommittedJun 30, 2022
Hack webpack to not use MD4
No longer have support for MD4, the default hashFunction. Mess with webpack to use sha256. This solution is from: webpack/webpack#13572 (comment) And was added to phosphor-webui here: openbmc/phosphor-webui@8588400 Ideally --openssl-legacy-provider would work as webpack/webpack#14532 describes but Node 16 supports linking with SSL 3.0 but doesn't support openssl-legacy-provider. See nodejs/node#40948. This should enable the new Yocto bump to pass. Tested: Build Witherspoon Tacoma with https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/48473 and the 3 and this change. The webui looked good. Change-Id: I66f2cc45af85096f9abe935d269838c6a680bc9b Signed-off-by: Gunnar Mills <[email protected]>
1 parent a202532 commit 896f56a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎vue.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ module.exports = {
5555
},
5656
productionSourceMap: false,
5757
configureWebpack: (config) => {
58+
const crypto = require('crypto');
59+
const crypto_orig_createHash = crypto.createHash;
60+
crypto.createHash = (algorithm) =>
61+
crypto_orig_createHash(algorithm == 'md4' ? 'sha256' : algorithm);
62+
5863
const envName = process.env.VUE_APP_ENV_NAME;
5964
const hasCustomStore = process.env.CUSTOM_STORE === 'true' ? true : false;
6065
const hasCustomRouter = process.env.CUSTOM_ROUTER === 'true' ? true : false;

0 commit comments

Comments
 (0)