File signal-desktop-webpack-openssl-3-0.patch of Package signal-desktop
Index: Signal-Desktop-5.33.0/webpack.config.ts
===================================================================
--- Signal-Desktop-5.33.0.orig/webpack.config.ts 2022-02-24 02:22:56.000000000 +0100
+++ Signal-Desktop-5.33.0/webpack.config.ts 2022-02-25 08:38:20.333331798 +0100
@@ -1,6 +1,12 @@
// Copyright 2019-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
+// 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:any) => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);
+
import { resolve } from 'path';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Configuration, EnvironmentPlugin, ProvidePlugin } from 'webpack';