PKCS8 EC private keys without the public key component cannot be imported with SubtleCrypto.importKey
Categories
(Core :: DOM: Web Crypto, defect)
Tracking
()
People
(Reporter: panva.ip, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(2 files)
Steps to reproduce:
// PKCS8 representation of a private P-384 EC key with the public key omitted
const pkcs8 = new Uint8Array([48, 78, 2, 1, 0, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 4, 55, 48, 53, 2, 1, 1, 4, 48, 32, 52, 118, 9, 96, 116, 119, 172, 168, 251, 251, 197, 230, 33, 132, 85, 243, 25, 150, 105, 121, 46, 248, 180, 102, 250, 168, 123, 220, 103, 121, 129, 68, 200, 72, 221, 3, 102, 30, 237, 90, 198, 36, 97, 52, 12, 234, 150])
await crypto.subtle.importKey('pkcs8', pkcs8, { name: 'ECDSA', namedCurve: 'P-384' }, false, ['sign'])
Actual results:
importKey is rejected with DOMException: Data provided to an operation does not meet requirements
Expected results:
EC private key PKCS8 without the public key component should import as in other browsers
Reporter | ||
Comment 1•2 years ago
|
||
working in Chrome
Comment 2•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 3•2 years ago
|
||
Test got added in bug 1741855.
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/b9191663cc08 set secure-payment-confirmation/enrollment.https.html as timing out on Linux code coverage. DONTBUILD
Updated•2 years ago
|
Backout by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/59657b0dd5aa Backed out changeset b9191663cc08 because it landed with wrong bug number
Description
•