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 md5 hashing on openssl 3 #934

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [10.x, 12.x, 14.x, 15.x, 16.x, 17.x]
webpack-version: [latest, '4']
include:
- node: 14.x
Expand Down
9 changes: 6 additions & 3 deletions src/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ const write = async function (filename, compress, result) {
* @return {String}
*/
const filename = function (source, identifier, options) {
// md4 hashing is not supported starting with node v17.0.0
const majorNodeVersion = parseInt(process.versions.node.split(".")[0], 10);
// md4 hashing is not supported by default in openssl 3
const majorOpensslVersion = parseInt(
process.versions.openssl.split(".")[0],
10,
);
let hashType = "md4";
if (majorNodeVersion >= 17) {
if (majorOpensslVersion >= 3) {
hashType = "md5";
}

Expand Down