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 25419 - ECDH importKey for SPKI handles errors differently than all other key types, notably ECDSA
Summary: ECDH importKey for SPKI handles errors differently than all other key types, ...
Status: RESOLVED FIXED
Alias: None
Product: Web Cryptography
Classification: Unclassified
Component: Web Cryptography API Document (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ryan Sleevi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-22 23:37 UTC by Ryan Sleevi
Modified: 2014-06-16 23:12 UTC (History)
1 user (show)

See Also:


Attachments

Description Ryan Sleevi 2014-04-22 23:37:25 UTC
The specification for ECDH importKey states for importKey

https://dvcs.w3.org/hg/webcrypto-api/raw-file/0a08958cf50f/spec/Overview.html#ecdh-operations

Import Key
  2. If format is "spki"
    ...
    4. If the parameters field of the algorithm AlgorithmIdentifier field of spki is absent, then return an error named SyntaxError

However, the corresponding errors returned for other ASN.1 related encoding errors are all DataError, as they are for the similar clause in the ECDSA importKey - https://dvcs.w3.org/hg/webcrypto-api/raw-file/0a08958cf50f/spec/Overview.html#ecdsa-operations - which states a DataError is returned

For consistency, all of the SPKI errors should be DataErrors if related to ASN.1 issues.