New issue
Advanced search Search tips

Issue 628416 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Wrong order of errors when calling crypto.subtle.exportKey() and wrapKey() on an unextractable key that doesn't support exportKey()

Project Member Reported by eroman@chromium.org, Jul 14 2016

Issue description

The WebCrypto spec tests in this order:

https://w3c.github.io/webcrypto/Overview.html#dfn-SubtleCrypto-method-exportKey

5. If the name member of of the [[algorithm]] internal slot of key does not identify a registered algorithm that supports the export key operation, then throw a NotSupportedError.

6. If the [[extractable]] internal slot of key is false, then throw an InvalidAccessError.


Whereas in Chrome the reverse order is done.

The consequence of this when both failures are present Chrome will return a different error than the spec says.

I believe this is relevant when exporting a KDF key marked as un-extractable (i.e. PBKDF2).
 

Comment 1 by eroman@chromium.org, Jul 14 2016

Summary: Wrong order of errors when calling crypto.subtle.exportKey() and wrapKey() on an unextractable key that doesn't support exportKey() (was: Wrong order of errors when calling crypto.subtle.exportKey() on an unextractable key that doesn't support exportKey())
Same issue applies to wrapKey()
Project Member

Comment 2 by sheriffbot@chromium.org, Jul 17 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 3 by eroman@chromium.org, Jul 20 2017

Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Project Member

Comment 4 by sheriffbot@chromium.org, Jul 23

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)

Sign in to add a comment