New issue
Advanced search Search tips

Issue 628423 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

For crypto.subtle.* operations, check key.algorithm.name BEFORE checking key.usages

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

Issue description

For instance step 8 and 9 of decrypt() state:

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

8. If the name member of normalizedAlgorithm is not equal to the name attribute of the [[algorithm]] internal slot of key then throw an InvalidAccessError.

9. If the [[usages]] internal slot of key does not contain an entry that is "decrypt", then throw an InvalidAccessError.

Chrome does the checks in the opposite order.

.... technically the result is still spec-compliant since in both cases an InvalidAccessError is returned, however the error message will contradict the presumed ordering.
 

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

Owner: eroman@chromium.org
Status: Assigned (was: Available)

Comment 3 by eroman@chromium.org, Jul 19 2016

Status: Fixed (was: Assigned)

Sign in to add a comment