Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SHA-256 as the webpack hash function #1743

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jbg
Copy link
Contributor

@jbg jbg commented Oct 7, 2021

Webpack defaults to MD4 as the output hash function. MD4 was moved to the legacy provider in OpenSSL 3.0 and is not available by default. As a result, webpack fails to run on any system with OpenSSL 3.0 or later.

This patch sets the hash function explicitly to SHA-256 which fixes the webpack build on such systems. SHA-256 is chosen as a reasonable modern default.

An alternative solution would be to upgrade to webpack v5.54.0 or later and use webpack's future default hash function xxhash64, which doesn't depend on OpenSSL and is also faster than SHA-256.

Related: jitsi/jitsi-meet#10112

Webpack [defaults to MD4](https://webpack.js.org/configuration/output/#outputhashfunction) as the output hash function. MD4 was [moved to the legacy provider](https://www.openssl.org/news/changelog.html#openssl-30) in OpenSSL 3.0 and is not available by default. As a result, webpack fails to run on any system with OpenSSL 3.0 or later.

This patch sets the hash function explicitly to SHA-256 which fixes the webpack build on such systems. SHA-256 is chosen as a reasonable modern default.

An alternative solution would be to upgrade to webpack v5.54.0 or later and use webpack's future default hash function `xxhash64`, which doesn't depend on OpenSSL and is also faster than SHA-256.
@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@jbg
Copy link
Contributor Author

jbg commented Oct 7, 2021

CLA already signed

@saghul
Copy link
Member

saghul commented Oct 7, 2021

We will be moving to webpack 5 soon: jitsi/jitsi-meet#9716

@saghul
Copy link
Member

saghul commented Oct 7, 2021

Jenkins please test this please.

@saghul
Copy link
Member

saghul commented Nov 10, 2021

Ops, this has a conflict, can you resolve it please?

@sapkra sapkra added the feature-request Issue is really a feature request label Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Issue is really a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants