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: fix webcrypto ECDH JWK import #35855

Closed
wants to merge 1 commit into from
Closed

Conversation

panva
Copy link
Member

@panva panva commented Oct 28, 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 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).

fixes nodejs#35812
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

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

panva commented Oct 28, 2020

cc @jasnell

@panva
Copy link
Member Author

panva commented Oct 28, 2020

CI failure's unrelated to the change.

@nodejs-github-bot
Copy link
Collaborator

@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 :)

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: #35855
Fixes: #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
Contributor

danbev commented Oct 30, 2020

Landed in e8fe38f.

@danbev danbev 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: #35855
Fixes: #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>
@targos targos mentioned this pull request Nov 3, 2020
@panva panva deleted the fix-35812 branch October 13, 2022 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Issues 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