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

oct JWK should not require alg during importKey #37

Closed
panva opened this issue Nov 9, 2021 · 3 comments
Closed

oct JWK should not require alg during importKey #37

panva opened this issue Nov 9, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@panva
Copy link
Contributor

panva commented Nov 9, 2021

The HmacCryptoKey and AesCryptoKey interfaces wrongfully require the alg attribute to be present when importing keyData in jwk key format.

Every other webcrypto runtime allows these to omitted and in order to have interoperable behaviour between runtimes it is in fact better to remove the alg attribute.

@panva panva changed the title oct JWK should not require alg oct JWK should not require alg during importKey Nov 9, 2021
@microshine
Copy link
Collaborator

Looks like Chrome compares key_ops and alg with incoming parameters if those fields present in JWK
image

I'll fix it

@microshine microshine added the bug Something isn't working label Nov 9, 2021
@microshine
Copy link
Collaborator

@panva The new version @peculiar/webcrypto@1.2.1 has been published

@panva
Copy link
Contributor Author

panva commented Nov 10, 2021

@microshine confirmed, thank you!

@panva panva closed this as completed Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants