This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23762 - Importing rich key formats doesn't play well with default arguments
Summary: Importing rich key formats doesn't play well with default arguments
Status: CLOSED INVALID
Alias: None
Product: Web Cryptography
Classification: Unclassified
Component: Web Cryptography API Document (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ryan Sleevi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-07 18:22 UTC by Alexey Proskuryakov
Modified: 2014-02-21 01:52 UTC (History)
1 user (show)

See Also:


Attachments

Description Alexey Proskuryakov 2013-11-07 18:22:23 UTC
Consider crypto.subtle.importKey("jwk", jwkData).

This looks like a very reasonable way to import a JWK key. But it does not work, because keyUsage argument will default to [], and this empty usage will be intersected with key use from inside JWK, yielding an empty usage.
Comment 1 Mark Watson 2014-02-20 21:18:00 UTC
Default arguments were removed by Bug 19705
Comment 2 Alexey Proskuryakov 2014-02-21 01:52:24 UTC
OK.

However, see bug 24759, which asks for a way to import JWK without spelling out parameters.