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

fix: use sha instead of deprecated md5 for hash algorithm #868

Merged
merged 2 commits into from
Feb 11, 2022

Conversation

shakefu
Copy link
Contributor

@shakefu shakefu commented Feb 4, 2022

OpenSSL deprecates and fully removes "md5" as a hash algorithm. This pull request replaces references to "md5" with "sha".

This should resolve the ERR_OSSL_EVP_UNSUPPORTED errors.

Should theoretically fix #805 but I am unable to get tests to pass locally, which seems unrelated.

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@styfle styfle added the automerge Automatically merge PR once checks pass label Feb 11, 2022
@kodiakhq kodiakhq bot merged commit 7bbe288 into vercel:main Feb 11, 2022
Copy link

@markoenix markoenix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'md2' in 221

kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request May 23, 2022
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`

`yarn dev` failed (exit 1) on Node.js 17 & Node.js 18:

```
ncc_amp_optimizer failed because error:0308010C:digital envelope routines::unsupported
[...]
ncc_next__react_dev_overlay failed because error:0308010C:digital envelope routines::unsupported
```

The issue was reported to `@vercel/ncc` (vercel/ncc#805) and fixed by vercel/ncc#868, and `@vercel/ncc@0.33.2` includes the fix. However, Next.js still uses `@vercel/ncc@0.33.1` in `devDependencies`.

The PR bump `@vercel/ncc` to the latest version (which is 0.33.4).
LuighiV pushed a commit to openpolitica/create-openpolitica-nextjs-app that referenced this pull request Aug 24, 2022
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`

`yarn dev` failed (exit 1) on Node.js 17 & Node.js 18:

```
ncc_amp_optimizer failed because error:0308010C:digital envelope routines::unsupported
[...]
ncc_next__react_dev_overlay failed because error:0308010C:digital envelope routines::unsupported
```

The issue was reported to `@vercel/ncc` (vercel/ncc#805) and fixed by vercel/ncc#868, and `@vercel/ncc@0.33.2` includes the fix. However, Next.js still uses `@vercel/ncc@0.33.1` in `devDependencies`.

The PR bump `@vercel/ncc` to the latest version (which is 0.33.4).
tao12345666333 added a commit to tao12345666333/setup-kind that referenced this pull request Dec 1, 2022
* Node.js 12 actions are deprecated. For more information see:
  https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

* Since I will encounter the error ERR_OSSL_EVP_UNSUPPORTED after
  upgrading to Node 16, I also upgraded the version of ncc.
  vercel/ncc#868

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
chingor13 pushed a commit to googleapis/release-please-action that referenced this pull request Nov 1, 2023
Fix the
[build](https://github.com/google-github-actions/release-please-action/actions/runs/6384766312/job/17328084659):

```
> release-please-action@3.7.12 build
> ncc build index.js

ncc: Version 0.27.0
ncc: Compiling file index.js
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at hashOf (/home/runner/work/release-please-action/release-please-action/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:3253134)
    at ncc (/home/runner/work/release-please-action/release-please-action/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:1:3256648)
    at runCmd (/home/runner/work/release-please-action/release-please-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:51537)
    at 819 (/home/runner/work/release-please-action/release-please-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:48344)
    at __webpack_require__ (/home/runner/work/release-please-action/release-please-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:55043)
    at /home/runner/work/release-please-action/release-please-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:55194
    at /home/runner/work/release-please-action/release-please-action/node_modules/@vercel/ncc/dist/ncc/cli.js.cache.js:1:55220
    at Object.<anonymous> (/home/runner/work/release-please-action/release-please-action/node_modules/@vercel/ncc/dist/ncc/cli.js:8:28) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
```

I think the problem is linked to the [Node version
upgrade](https://github.com/google-github-actions/release-please-action/pull/835)
and the [OpenSSL
version](https://nodejs.org/fr/blog/vulnerability/openssl-november-2022).
The `@vercel/ncc` upgrade fixes the problem because they
[replaced](vercel/ncc#868) a deprecated hash
algorithm with _sha256_.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PR once checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails with Node.js 17
3 participants