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

OpenSSL 3 breaks webpack build #22305

Closed
rillian opened this issue Apr 14, 2022 · 0 comments · Fixed by brave/brave-core#13021
Closed

OpenSSL 3 breaks webpack build #22305

rillian opened this issue Apr 14, 2022 · 0 comments · Fixed by brave/brave-core#13021
Assignees
Labels
OS/Android Fixes related to Android browser functionality OS/Desktop OS/Linux QA/No release-notes/include

Comments

@rillian
Copy link

rillian commented Apr 14, 2022

Description

After upgrading my dev system to openssl 3.0, the build fails at npm run web-ui

(node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

This is apparently because webpack uses the obsolete md4 hash by default, which is no longer available.

Steps to Reproduce

  1. Build brave on Fedora 36. Ubuntu 22.04 should also show the problem.

Actual result:

Build fails

Expected result:

Build should succeed.

Reproduces how often:

I tried various node packages; the issue seems to be the system crypto library.

Desktop Brave version:

This is building 1.39.x nightly.

Miscellaneous Information:

Work around is to not update for now. Setting NODE_OPTIONS=--openssl-legacy-provider in the environment may also work around with node 17 or later.

@rillian rillian added OS/Android Fixes related to Android browser functionality OS/Desktop labels Apr 14, 2022
@rillian rillian self-assigned this Apr 14, 2022
rillian added a commit to brave/brave-core that referenced this issue Apr 14, 2022
OpenSSL 3.x removed the md4 hash, which is hardcoded by webpack
versions prior to 6. This breaks the build on systems providing
the current OpenSSL release, such as Ubuntu 22.04 or Fedora 36.

Work around by monkey-patching the crypto module to use the sha256
hash instead in our webpack invocations.

See webpack/webpack#13572

Resolves brave/brave-browser#22305
rillian added a commit to brave/brave-core that referenced this issue Apr 18, 2022
OpenSSL 3.x removed the md4 hash, which is hardcoded by webpack
versions prior to 6. This breaks the build on systems providing
the current OpenSSL release, such as Ubuntu 22.04 or Fedora 36.

Work around by monkey-patching the crypto module to use the sha256
hash instead in our webpack invocations.

See webpack/webpack#13572

Resolves brave/brave-browser#22305
@rillian rillian added this to the 1.39.x - Nightly milestone Apr 19, 2022
avinassh pushed a commit to avinassh/brave-browser-hardening that referenced this issue May 29, 2022
 - Added Solana support for account creation, sending SOL and sending SPL tokens with Brave Wallet. ([#22348](brave/brave-browser#22348))
 - Added the ability to buy with Ramp using Brave Wallet. ([#21639](brave/brave-browser#21639))
 - Added JSONSanitizer to API helper requests for Brave Wallet. ([#21831](brave/brave-browser#21831))
 - Added Dapp UI for requesting a public key and for decrypting ciphers using Brave Wallet. ([#21177](brave/brave-browser#21177))
 - Added web3_clientVersion support for Brave Wallet. ([#19278](brave/brave-browser#19278))
 - Added the ability to allow users to search sites for RSS feeds for Brave News. ([#21768](brave/brave-browser#21768))
 - Added support for blob partitioning. ([#21746](brave/brave-browser#21746))
 - Added minimum macOS version for Sparkle update process. ([#22918](brave/brave-browser#22918))
 - [Security] Blocked "window.ethereum" completely in third party iframes. ([#22686](brave/brave-browser#22686))
 - [Security] Updated Brave Wallet panel to prominently display eTLD+1 as reported on HackerOne by renekroka. ([#21787](brave/brave-browser#21787))
 - [Security] Fixed incorrect origin being displayed in Brave Wallet when a spend approval is pending. ([#19557](brave/brave-browser#19557))
 - Implemented eth_getEncryptionPublicKey for Brave Wallet. ([#19276](brave/brave-browser#19276))
 - Implemented account discovery when restoring Brave Wallet. ([#18104](brave/brave-browser#18104))
 - Updated Omaha installer version for Windows to v1.3.36.113. ([#22060](brave/brave-browser#22060))
 - Updated default IPFS configuration values. ([#22068](brave/brave-browser#22068))
 - Updated Gas Limit validation and error messaging for unapproved transactions with Brave Wallet. ([#21714](brave/brave-browser#21714))
 - Updated Brave Wallet to automatically add swap taker asset to the visible asset list. ([#21428](brave/brave-browser#21428))
 - Updated Brave Wallet portfolio network filter for multichain support. ([#20780](brave/brave-browser#20780))
 - Reduced adblock filter memory usage by optimizing unused regex rules. ([#21970](brave/brave-browser#21970))
 - Removed known Dialog Insight user tracking parameters from URLs. ([#22082](brave/brave-browser#22082))
 - Removed ability to swap ERC721 tokens with Brave Wallet. ([#21550](brave/brave-browser#21550))
 - Fixed crash which occurred when opening Brave Shields while using Google Meet. ([#22814](brave/brave-browser#22814))
 - Fixed inability to rename Solana account in Brave Wallet after it has been created. ([#22958](brave/brave-browser#22958))
 - Fixed incorrectly computed insufficient funds errors in Brave Wallet. ([#22877](brave/brave-browser#22877))
 - Fixed ERC20 and ERC721 transfers being incorrectly displayed as ETH transfers in the Brave Wallet transactions panel. ([#22044](brave/brave-browser#22044))
 - Fixed text alignment issues under the Brave Wallet "Recent transactions" panel when using long account names. ([#21216](brave/brave-browser#21216))
 - Fixed breakage in webpack build caused by OpenSSL 3.0. ([#22305](brave/brave-browser#22305))
 - Fixed two windows being opened on launch when the browser was installed without administrator privileges on Windows. ([#22179](brave/brave-browser#22179))
 - Upgraded Chromium to 102.0.5005.61. ([#22923](brave/brave-browser#22923)) ([Changelog for 102.0.5005.61](https://chromium.googlesource.com/chromium/src/+log/101.0.4951.67..102.0.5005.61?pretty=fuller&n=1000))
avinassh pushed a commit to avinassh/brave-browser-hardening that referenced this issue May 29, 2022
 - Added Brave Firewall + VPN. ([#12197](brave/brave-browser#12197))
 - Added support for blob partitioning. ([#21746](brave/brave-browser#21746))
 - Implemented eth_getEncryptionPublicKey for Brave Wallet. ([#19276](brave/brave-browser#19276))
 - Reduced adblock filter memory usage by optimizing unused regex rules. ([#21970](brave/brave-browser#21970))
 - Removed known Dialog Insight user tracking parameters from URLs. ([#22082](brave/brave-browser#22082))
 - Fixed breakage in webpack build caused by OpenSSL 3.0. ([#22305](brave/brave-browser#22305))
 - Fixed pending bell icon under Brave Wallet not being displayed when new unapproved requests are created. ([#21654](brave/brave-browser#21654))
 - Fixed expand icon under Brave Shields using incorrect color when the Privacy Hub has been enabled. ([#22049](brave/brave-browser#22049))
 - Upgraded Chromium to 102.0.5005.61. ([#22923](brave/brave-browser#22923)) ([Changelog for 102.0.5005.61](https://chromium.googlesource.com/chromium/src/+log/101.0.4951.67..102.0.5005.61?pretty=fuller&n=1000))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS/Android Fixes related to Android browser functionality OS/Desktop OS/Linux QA/No release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant