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

tls: use crypto.hash() for faster sha1 creation #57340

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

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Mar 5, 2025

We should use the new crypto.hash() method for faster sha1 creation.

cc @joyeecheung for creating the crypto.hash() method.

@anonrig anonrig requested a review from jasnell March 5, 2025 21:32
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem. labels Mar 5, 2025
@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Mar 5, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 5, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

LGTM though I do wonder why it is not cached....

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.20%. Comparing base (8342183) to head (7e7b252).
Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #57340   +/-   ##
=======================================
  Coverage   90.19%   90.20%           
=======================================
  Files         630      630           
  Lines      185195   185191    -4     
  Branches    36249    36246    -3     
=======================================
+ Hits       167036   167047   +11     
+ Misses      11132    11125    -7     
+ Partials     7027     7019    -8     
Files with missing lines Coverage Δ
lib/_tls_wrap.js 93.37% <100.00%> (-0.02%) ⬇️

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 6, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Mar 7, 2025
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/57340
✔  Done loading data for nodejs/node/pull/57340
----------------------------------- PR info ------------------------------------
Title      tls: use crypto.hash() for faster sha1 creation (#57340)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     anonrig:yagiz/speed-up-sha1-tls -> nodejs:main
Labels     tls, author ready, needs-ci
Commits    1
 - tls: use crypto.hash() for faster sha1 creation
Committers 1
 - Yagiz Nizipli <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/57340
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/57340
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Wed, 05 Mar 2025 21:32:26 GMT
   ✔  Approvals: 4
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/57340#pullrequestreview-2662561669
   ✔  - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/57340#pullrequestreview-2662652925
   ✔  - Filip Skokan (@panva): https://github.com/nodejs/node/pull/57340#pullrequestreview-2664425273
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/57340#pullrequestreview-2664896993
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-03-06T11:58:21Z: https://ci.nodejs.org/job/node-test-pull-request/65611/
- Querying data for job/node-test-pull-request/65611/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 57340
From https://github.com/nodejs/node
 * branch                  refs/pull/57340/merge -> FETCH_HEAD
✔  Fetched commits as abd73d865ae2..7e7b25259a45
--------------------------------------------------------------------------------
Auto-merging lib/_tls_wrap.js
CONFLICT (content): Merge conflict in lib/_tls_wrap.js
error: could not apply 7e7b25259a... tls: use crypto.hash() for faster sha1 creation
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
   ✘  Failed to apply patches
https://github.com/nodejs/node/actions/runs/13729754797

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants