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

crypto: ensure CryptoKey usages and algorithm are cached objects #56108

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

panva
Copy link
Member

@panva panva commented Dec 2, 2024

As per the spec both the usages and algorithm are "cached", i.e. not new objects every time the getter is invoked.

This fixes the behaviour for usages and adds tests for both.

@panva panva added crypto Issues and PRs related to the crypto subsystem. webcrypto labels Dec 2, 2024
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Dec 2, 2024
@panva
Copy link
Member Author

panva commented Dec 2, 2024

@panva panva added request-ci Add this label to start a Jenkins CI on a PR. web-standards Issues and PRs related to Web APIs labels Dec 2, 2024
@panva
Copy link
Member Author

panva commented Dec 2, 2024

cc @nodejs/web-standards

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 2, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.00%. Comparing base (08e0147) to head (e05035c).
Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56108      +/-   ##
==========================================
+ Coverage   87.96%   88.00%   +0.03%     
==========================================
  Files         656      656              
  Lines      188383   188981     +598     
  Branches    35975    35993      +18     
==========================================
+ Hits       165716   166308     +592     
+ Misses      15842    15832      -10     
- Partials     6825     6841      +16     
Files with missing lines Coverage Δ
lib/internal/crypto/keys.js 93.88% <100.00%> (-0.01%) ⬇️

... and 39 files with indirect coverage changes

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 2, 2024
@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 2, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 4, 2024
@nodejs-github-bot nodejs-github-bot merged commit 4e44322 into nodejs:main Dec 4, 2024
80 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 4e44322

@panva panva deleted the ensure-cached-slots branch December 4, 2024 10:57
aduh95 pushed a commit to aduh95/node that referenced this pull request Dec 4, 2024
PR-URL: nodejs#56108
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
aduh95 pushed a commit to aduh95/node that referenced this pull request Dec 4, 2024
PR-URL: nodejs#56108
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this pull request Dec 6, 2024
PR-URL: #56108
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56108
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56108
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56108
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
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. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. web-standards Issues and PRs related to Web APIs webcrypto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants