Closed
Bug 1088042
Opened 9 years ago
Closed 9 years ago
"JWK export of a symmetric key" test uses a malformed JsonWebKey object
Categories
(Core :: DOM: Security, defect)
Core
DOM: Security
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: ggp, Assigned: ggp)
References
Details
Attachments
(1 file, 1 obsolete file)
4.10 KB,
patch
|
rbarnes
:
review+
|
Details | Diff | Splinter Review |
It's missing the required kty field. This caused the binding layer to reject the object [1] when importing the key, and |mDataIsJwk| to be used uninitialized later in ImportSymmetricKeyTask::BeforeCrypto. 1- http://dxr.mozilla.org/mozilla-central/source/dom/crypto/WebCryptoTask.cpp#1282
Assignee | ||
Comment 1•9 years ago
|
||
This patch properly initializes mDataIsJwk and fixes the JsonWebKey object. However, a proper solution to this probably involves propagating the error from the binding layer instead of swallowing it inside SetKeyData.
Assignee | ||
Comment 2•9 years ago
|
||
This updated version will also abort early when SetKeyData fails in the constructors for Import*KeyTask. Since SetKeyData(const CryptoBuffer &) was already setting mEarlyRv implicitly through SetJwkFromKeyData, I made SetKeyData(JSContext*, JSHandle<JSObject*>) also set mEarlyRv and the ctors return early when it indicates failure.
Attachment #8510318 -
Attachment is obsolete: true
Attachment #8510391 -
Flags: review?(rlb)
Updated•9 years ago
|
Attachment #8510391 -
Flags: review?(rlb) → review+
Assignee | ||
Comment 3•9 years ago
|
||
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=345d0197ea50
Assignee: nobody → ggoncalves
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 4•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/299ebc930b9c
Keywords: checkin-needed
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/299ebc930b9c
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•