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 invalid SubtleCrypto JWK data import results in DataError #55041

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

Conversation

panva
Copy link
Member

@panva panva commented Sep 21, 2024

All invalid data during import is supposed to return DataError DOMException. See https://w3c.github.io/webcrypto/

The WPTs for this are coming in web-platform-tests/wpt#48243 but I'm opening this separately to be able to backport this easily.

@panva panva added crypto Issues and PRs related to the crypto subsystem. request-ci Add this label to start a Jenkins CI on a PR. webcrypto labels Sep 21, 2024
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Sep 21, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2024
@nodejs-github-bot
Copy link
Collaborator

@panva panva added lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x web-standards Issues and PRs related to Web APIs labels Sep 21, 2024
@panva
Copy link
Member Author

panva commented Sep 21, 2024

cc @nodejs/web-standards

Copy link

codecov bot commented Sep 21, 2024

Codecov Report

Attention: Patch coverage is 80.76923% with 10 lines in your changes missing coverage. Please review.

Project coverage is 88.23%. Comparing base (d5c29ba) to head (4f79636).
Report is 79 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/crypto/aes.js 33.33% 4 Missing ⚠️
lib/internal/crypto/mac.js 33.33% 4 Missing ⚠️
lib/internal/crypto/ec.js 87.50% 1 Missing ⚠️
lib/internal/crypto/rsa.js 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55041      +/-   ##
==========================================
+ Coverage   88.06%   88.23%   +0.16%     
==========================================
  Files         652      652              
  Lines      183546   183886     +340     
  Branches    35860    35860              
==========================================
+ Hits       161648   162251     +603     
+ Misses      15149    14916     -233     
+ Partials     6749     6719      -30     
Files with missing lines Coverage Δ
lib/internal/crypto/cfrg.js 96.93% <100.00%> (+0.08%) ⬆️
lib/internal/crypto/ec.js 92.78% <87.50%> (+0.13%) ⬆️
lib/internal/crypto/rsa.js 90.44% <87.50%> (+0.16%) ⬆️
lib/internal/crypto/aes.js 90.32% <33.33%> (-1.05%) ⬇️
lib/internal/crypto/mac.js 89.89% <33.33%> (-1.91%) ⬇️

... and 102 files with indirect coverage changes

@panva panva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 21, 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. lib / src Issues and PRs related to general changes in the lib or src directory. lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x 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