File webpack-openssl-3-0.patch of Package code
Fix build on Fedora. Thanks to Andreas Schneider (signal-desktop maintainer) for the patch
--- a/build/lib/extensions.js 2022-06-14 12:55:41.000000000 +0200
+++ b/build/lib/extensions.js 2022-06-26 23:18:16.655790028 +0200
@@ -1,4 +1,10 @@
"use strict";
+// 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);
+
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.