Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Issue 770363002: [WebCrypto] Crypto tests updated to use KeyUsage (Closed)

Created:
6 years ago by Habib Virji
Modified:
6 years ago
Reviewers:
eroman
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[WebCrypto] Crypto tests updated to use KeyUsage As per update in the WebCrypto, keyUsage cannot be empty. Updates tests to include appropriate keyUsage. This is needed to avoid SyntaxError being generated and being spec complaint. R=eroman BUG=425646 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187487

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : Updated deserialized key test #

Patch Set 4 : #

Total comments: 8

Patch Set 5 : Updated test to check more values and added comments #

Patch Set 6 : Updated to match latest changes of CL:809533002 #

Total comments: 4

Patch Set 7 : Renamed file and removed unwanted expected file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -393 lines) Patch
M LayoutTests/crypto/clone-aesKey.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/crypto/clone-aesKey-expected.txt View 4 chunks +0 lines, -140 lines 0 comments Download
M LayoutTests/crypto/clone-hmacKey.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/crypto/clone-hmacKey-expected.txt View 6 chunks +0 lines, -234 lines 0 comments Download
A LayoutTests/crypto/deserialize-legacy-aes-key-empty-usages.html View 1 2 3 4 5 6 1 chunk +29 lines, -0 lines 0 comments Download
A LayoutTests/crypto/deserialize-legacy-aes-key-empty-usages-expected.txt View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/crypto/import-jwk.html View 1 2 3 4 5 1 chunk +17 lines, -17 lines 0 comments Download

Messages

Total messages: 28 (1 generated)
Habib Virji
This is needed as KeyUsage cannot be empty.
6 years ago (2014-12-02 14:55:47 UTC) #1
eroman
The test changes look_good. Please additionally add some test coverage for the case of de-serializing ...
6 years ago (2014-12-02 15:10:52 UTC) #2
Habib Virji
Thanks eroman, uploaded new tests which stores key in indexdb with empty keyusage and fetches ...
6 years ago (2014-12-05 14:32:03 UTC) #3
eroman
https://codereview.chromium.org/770363002/diff/20001/LayoutTests/crypto/exportKey-deserializedKey.html File LayoutTests/crypto/exportKey-deserializedKey.html (right): https://codereview.chromium.org/770363002/diff/20001/LayoutTests/crypto/exportKey-deserializedKey.html#newcode25 LayoutTests/crypto/exportKey-deserializedKey.html:25: return internals.deserializeBuffer(internals.serializeObject(keyDesc)); This isn't what I had in mind. ...
6 years ago (2014-12-05 17:16:00 UTC) #4
Habib Virji
On 2014/12/05 at 17:16:00, eroman wrote: Did not fathom correctly. So the steps are basically. ...
6 years ago (2014-12-05 18:26:19 UTC) #5
eroman
Right. Once you have de-serialized to a key, the important verification is to test the ...
6 years ago (2014-12-05 18:57:23 UTC) #6
Habib Virji
On 2014/12/05 18:57:23, eroman wrote: > Right. Once you have de-serialized to a key, the ...
6 years ago (2014-12-08 18:46:11 UTC) #7
eroman
The tests strip out the version number embedded in the serialized data. Your test can ...
6 years ago (2014-12-08 18:48:44 UTC) #8
eroman
Any update on this? These test changes need to be committed before the Chromium-side can ...
6 years ago (2014-12-09 20:54:47 UTC) #9
Habib Virji
Sorry for late response. I am trying out following: 1. I have a key similar ...
6 years ago (2014-12-15 18:27:39 UTC) #10
eroman
> crypto.subtle.importKey('raw', hexStringToUint8Array("30112233445566778899aabbccddeeff"), {name: "AES-CBC"}, false, []).then(function(importedKey) { Above line looks fine. console.log(JSON.stringify(internals.deserializeBuffer(internals.serializeObject(importedKey)))); --> This ...
6 years ago (2014-12-15 21:38:14 UTC) #11
Habib Virji
Thanks, it was error because of not passing DOMArrayBufferView. Uploaded new tests.
6 years ago (2014-12-16 10:34:55 UTC) #12
eroman
https://codereview.chromium.org/770363002/diff/60001/LayoutTests/crypto/importKey-deserialized.html File LayoutTests/crypto/importKey-deserialized.html (right): https://codereview.chromium.org/770363002/diff/60001/LayoutTests/crypto/importKey-deserialized.html#newcode10 LayoutTests/crypto/importKey-deserialized.html:10: description("Check already imported key, with empty usage can be ...
6 years ago (2014-12-16 20:23:53 UTC) #13
Habib Virji
Updated the tests with comments and extra checks. Thanks. https://codereview.chromium.org/770363002/diff/60001/LayoutTests/crypto/importKey-deserialized.html File LayoutTests/crypto/importKey-deserialized.html (right): https://codereview.chromium.org/770363002/diff/60001/LayoutTests/crypto/importKey-deserialized.html#newcode10 LayoutTests/crypto/importKey-deserialized.html:10: ...
6 years ago (2014-12-17 11:54:36 UTC) #14
eroman
not lgtm https://codereview.chromium.org/770363002/diff/100001/LayoutTests/crypto/exportKey-deserializedKey-expected.txt File LayoutTests/crypto/exportKey-deserializedKey-expected.txt (right): https://codereview.chromium.org/770363002/diff/100001/LayoutTests/crypto/exportKey-deserializedKey-expected.txt#newcode1 LayoutTests/crypto/exportKey-deserializedKey-expected.txt:1: Test storing a Raw key in IndexedDB, ...
6 years ago (2014-12-17 21:08:43 UTC) #15
Habib Virji
Renamed file and deleted one left out expected file. https://codereview.chromium.org/770363002/diff/100001/LayoutTests/crypto/exportKey-deserializedKey-expected.txt File LayoutTests/crypto/exportKey-deserializedKey-expected.txt (right): https://codereview.chromium.org/770363002/diff/100001/LayoutTests/crypto/exportKey-deserializedKey-expected.txt#newcode1 LayoutTests/crypto/exportKey-deserializedKey-expected.txt:1: ...
6 years ago (2014-12-18 09:36:39 UTC) #16
eroman
lgtm
6 years ago (2014-12-18 17:26:30 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/770363002/120001
6 years ago (2014-12-18 17:27:18 UTC) #19
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://src.chromium.org/viewvc/blink?view=rev&revision=187487
6 years ago (2014-12-18 19:47:17 UTC) #20
eroman
It doesn't appear this change was complete, there are some places which weren't updated: crypto/clone-ecKey-private.html ...
6 years ago (2014-12-18 20:06:08 UTC) #21
Habib Virji
On 2014/12/18 20:06:08, eroman wrote: > It doesn't appear this change was complete, there are ...
6 years ago (2014-12-18 21:32:29 UTC) #22
eroman
Yes, please add the other ones in a new changelist (This one is already committed)
6 years ago (2014-12-18 21:39:18 UTC) #23
Habib Virji
On 2014/12/18 21:39:18, eroman wrote: > Yes, please add the other ones in a new ...
6 years ago (2014-12-18 21:40:39 UTC) #24
Habib Virji
On 2014/12/18 21:39:18, eroman wrote: > Yes, please add the other ones in a new ...
6 years ago (2014-12-18 21:40:39 UTC) #25
Habib Virji
On 2014/12/18 21:39:18, eroman wrote: > Yes, please add the other ones in a new ...
6 years ago (2014-12-18 21:40:40 UTC) #26
Habib Virji
On 2014/12/18 21:40:40, Habib Virji wrote: > On 2014/12/18 21:39:18, eroman wrote: > > Yes, ...
6 years ago (2014-12-18 21:41:00 UTC) #27
Habib Virji
6 years ago (2014-12-18 21:50:10 UTC) #28
Message was sent while issue was closed.
Found issue it was due to these tests are present in TestExpectations  and both
these tests did not appear in failed tests.

Powered by Google App Engine
This is Rietveld 408576698