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: do not add undefined hash in webcrypto normalizeAlgorithm #42559

Merged

Conversation

panva
Copy link
Member

@panva panva commented Apr 1, 2022

Every now and then, when working with node's WebCryptoAPI, I noticed that the key's algorithm had an undefined hash property that wasn't present at the time of importing/deriving/generating. This, while not affecting the functionality of webcrypto, is not expected. This PR fixes that.

@panva panva added crypto Issues and PRs related to the crypto subsystem. webcrypto labels Apr 1, 2022
@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 Apr 1, 2022
@tniessen
Copy link
Member

tniessen commented Apr 1, 2022

Looks like there are some related failures, could you take a look, please?

@panva
Copy link
Member Author

panva commented Apr 1, 2022

Looks like there are some related failures, could you take a look, please?

Yeah i'm trying to figure out how to best debug wpt failures right now.

@panva panva marked this pull request as draft April 1, 2022 16:07
@panva panva force-pushed the fix-undefined-hash-from-normalize branch from b09d864 to df21856 Compare April 1, 2022 16:45
@nodejs nodejs deleted a comment from nodejs-github-bot Apr 1, 2022
@panva panva marked this pull request as ready for review April 1, 2022 16:46
@nodejs nodejs deleted a comment from nodejs-github-bot Apr 1, 2022
@panva panva force-pushed the fix-undefined-hash-from-normalize branch from df21856 to 379b548 Compare April 1, 2022 16:48
@nodejs-github-bot
Copy link
Collaborator

@panva panva removed the needs-ci PRs that need a full CI run. label Apr 1, 2022
@nodejs-github-bot
Copy link
Collaborator

@Trott Trott added the needs-ci PRs that need a full CI run. label Apr 2, 2022
@Trott
Copy link
Member

Trott commented Apr 2, 2022

A bit of an aside, but I've re-added the needs-ci label.

It's perhaps a bit confusingly named, but the needs-ci label is there for the commit queue automation. It tells the automation that this is a PR that should land only if there is a passing Jenkins CI run. It's not a label letting other people know that we need a CI run. So it should generally not be manually removed (unless it was incorrectly placed on a PR in the first place.)

Refs: https://github.com/nodejs/node-core-utils/blob/919ec3b784a2589aa88a1b2629b98d57283555a4/lib/pr_checker.js#L431-L438

@panva panva added experimental Issues and PRs related to experimental features. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Apr 2, 2022
Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

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

Tiny nit: since the file being test is called util.js, consider renaming the test to test-webcrypto-util.js (instead of test-webcrypto-utils.js).

test/parallel/test-webcrypto-utils.js Outdated Show resolved Hide resolved
test/parallel/test-webcrypto-utils.js Outdated Show resolved Hide resolved
lib/internal/crypto/util.js Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

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

Thanks for updating :)

@panva panva added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 3, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 3, 2022
@nodejs-github-bot nodejs-github-bot merged commit 5d0eb10 into nodejs:master Apr 3, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 5d0eb10

@panva panva deleted the fix-undefined-hash-from-normalize branch April 3, 2022 10:11
juanarbol pushed a commit to juanarbol/node that referenced this pull request Apr 5, 2022
PR-URL: nodejs#42559
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This was referenced Apr 5, 2022
juanarbol pushed a commit that referenced this pull request Apr 6, 2022
PR-URL: #42559
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
xtx1130 pushed a commit to xtx1130/node that referenced this pull request Apr 25, 2022
PR-URL: nodejs#42559
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
juanarbol pushed a commit that referenced this pull request May 31, 2022
PR-URL: #42559
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
danielleadams pushed a commit that referenced this pull request Jun 27, 2022
PR-URL: #42559
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
targos pushed a commit that referenced this pull request Jul 11, 2022
PR-URL: #42559
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #42559
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
PR-URL: nodejs/node#42559
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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. experimental Issues and PRs related to experimental features. needs-ci PRs that need a full CI run. webcrypto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants