X Tutup
The Wayback Machine - https://web.archive.org/web/20220817093728/https://github.com/nodejs/node/pull/42559
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 webcrypto labels Apr 1, 2022
@nodejs-github-bot
Copy link
Contributor

nodejs-github-bot commented Apr 1, 2022

Review requested:

@nodejs-github-bot nodejs-github-bot added the needs-ci 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 Apr 1, 2022
@panva panva force-pushed the fix-undefined-hash-from-normalize branch from b09d864 to df21856 Compare Apr 1, 2022
@nodejs nodejs deleted a comment from nodejs-github-bot Apr 1, 2022
@panva panva marked this pull request as ready for review Apr 1, 2022
@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 Apr 1, 2022
@nodejs-github-bot
Copy link
Contributor

nodejs-github-bot commented Apr 1, 2022

@panva panva removed the needs-ci label Apr 1, 2022
@nodejs-github-bot
Copy link
Contributor

nodejs-github-bot commented Apr 1, 2022

@Trott Trott added the needs-ci 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

Trott
Trott approved these changes Apr 2, 2022
@panva panva added experimental author ready labels Apr 2, 2022
Copy link
Member

@tniessen tniessen left a comment

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
Contributor

nodejs-github-bot commented Apr 2, 2022

Copy link
Member

@tniessen tniessen left a comment

Thanks for updating :)

@panva panva added the commit-queue label Apr 3, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue label Apr 3, 2022
@nodejs-github-bot nodejs-github-bot merged commit 5d0eb10 into nodejs:master Apr 3, 2022
50 checks passed
@nodejs-github-bot
Copy link
Contributor

nodejs-github-bot commented Apr 3, 2022

Landed in 5d0eb10

@panva panva deleted the fix-undefined-hash-from-normalize branch Apr 3, 2022
juanarbol pushed a commit to juanarbol/node that referenced this issue 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 issue 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 issue 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 issue 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 issue 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 issue 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 issue Jul 31, 2022
PR-URL: #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 crypto experimental needs-ci webcrypto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants
X Tutup