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 25816 - DH import of PKCS8 uses OperationError instead of DataError for privateKeyInfo parse failure
Summary: DH import of PKCS8 uses OperationError instead of DataError for privateKeyInf...
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-05-19 20:40 UTC by Ryan Sleevi
Modified: 2014-06-16 23:13 UTC (History)
1 user (show)

See Also:


Attachments

Description Ryan Sleevi 2014-05-19 20:40:32 UTC
The specification for handling "Import Key" for Diffie-Hellman ( https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#dh-operations ) states for Import Key

"If format is "pkcs8"":
  2. Let privateKeyInfo be the result of running the parse a privateKeyInfo algorithm over keyData
  3. If an error occurred whiled parsing, then return an error named OperationError

However, this differs from all other cases, where the error returned from a parse failure is a DataError.