SHA256
1
0
forked from pool/element-web
element-web/webpack-fix-openssl3.patch
2023-01-30 14:51:29 +00:00

17 lines
767 B
Diff

Index: element-web-1.11.20/webpack.config.js
===================================================================
--- element-web-1.11.20.orig/webpack.config.js 2023-01-20 13:52:01.000000000 +0100
+++ element-web-1.11.20/webpack.config.js 2023-01-27 13:16:14.405927597 +0100
@@ -1,5 +1,11 @@
/* eslint-disable quote-props */
+// HACK: OpenSSL 3 does not support md4 any more, but webpack hardcodes it all
+// over the place: https://github.com/webpack/webpack/issues/13572
+const crypto = require("crypto");
+const crypto_orig_createHash = crypto.createHash;
+crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);
+
const dotenv = require("dotenv");
const path = require("path");
const webpack = require("webpack");