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

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

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 20 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
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.

3 participants