Skip to content

crypto: fix webcrypto ECDH JWK import - #35855

Closed
panva wants to merge 1 commit into
nodejs:masterfrom
panva:fix-35812
Closed

crypto: fix webcrypto ECDH JWK import#35855
panva wants to merge 1 commit into
nodejs:masterfrom
panva:fix-35812

Conversation

@panva

@panvapanva commented Oct 28, 2020

Copy link
Copy Markdown
Member

This fixes the importKey operation when importing a JWK for the ECDH algorithm. As per the Web Crypto API specification the JWK alg property is not checked (as opposed to ECDSA for which the correct behaviour is implemented).

fixes#35812

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

This fixes the importKey operation when importing a JWK for the ECDH
algorithm. As per the Web Crypto API specification the JWK `alg`
property is not checked (as opposed to ECDSA).
fixesnodejs#35812
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-botnodejs-github-bot added the crypto Issues and PRs related to the crypto subsystem. label Oct 28, 2020
@panva

Copy link
Copy Markdown
MemberAuthor

cc @jasnell

@panva

Copy link
Copy Markdown
MemberAuthor

CI failure's unrelated to the change.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@tniessentniessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks :)

danbev pushed a commit that referenced this pull request Oct 30, 2020
This fixes the importKey operation when importing a JWK for the ECDH
algorithm. As per the Web Crypto API specification the JWK `alg`
property is not checked (as opposed to ECDSA).
PR-URL: #35855Fixes: #35812
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@danbev

Copy link
Copy Markdown
Contributor

Landed in e8fe38f.

@danbevdanbev closed this Oct 30, 2020
targos pushed a commit that referenced this pull request Nov 3, 2020
This fixes the importKey operation when importing a JWK for the ECDH
algorithm. As per the Web Crypto API specification the JWK `alg`
property is not checked (as opposed to ECDSA).
PR-URL: #35855Fixes: #35812
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@targostargos mentioned this pull request Nov 3, 2020
@panva
panva deleted the fix-35812 branch October 13, 2022 09:13
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cryptoIssues and PRs related to the crypto subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crypto(webcrypto): ECDH Named curve mismatch

7 participants

@panva@nodejs-github-bot@danbev@jasnell@Trott@tniessen@BethGriggs