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

Issue 958353003: [WebCrypto] Move cloneKey test to respective algorithm directory (Closed)

Created:
5 years, 9 months ago by Habib Virji
Modified:
5 years, 9 months ago
Reviewers:
eroman
CC:
blink-reviews, dglazkov+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[WebCrypto] Move cloneKey test to respective algorithm directory Creates a cloneKey.js per algorithm classes (symmetric/RSA/EC), which is called by each algorithm falling in respective class. - In symmetric-cloneKey.js, hashing and length are extra parameter which are present for HMAC and for HMAC/AES algorithm respectively. They have been handled via if case. - In ec-cloneKey.js, EC specific return values are checked. Similarly for RSA-cloneKey.js handles RSA specific return values. - Tests iterates for each particular algorithm depending on the extractable, key usage, algorithm parameters(i.e. hashing algorithm, named curve) and key data. The input data is present in the test file. HMAC has 8/64/88/128 bit data test. Similar for PBKDF2 & HKDF but also includes empty bit data test. Old files that has been updated: - clone-aesKey.html has been split in AES-CBC and AES-GCM. There were no cloneKey tests for AES-CTR and AES-KW, they have been added. - clone-ecKey-private/public has been split into ECDH and ECDSA. ECDH public test was missing, and has been added. - clone-hkdf and clone-pbkdf2, has been moved to HKDF and PBKDF2 respective directories. - clone-rsaHashedKey, holds tests only for RSASSA-PKCS1, tests has been moved to the algorithm directory. BUG=452269 R=eroman Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191772

Patch Set 1 #

Patch Set 2 : #

Total comments: 14

Patch Set 3 : Updated as per the review #

Total comments: 4

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3759 lines, -4555 lines) Patch
M LayoutTests/TestExpectations View 1 3 chunks +6 lines, -5 lines 0 comments Download
A LayoutTests/crypto/subtle/aes-cbc/cloneKey.html View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/aes-cbc/cloneKey-expected.txt View 2 2 chunks +1 line, -211 lines 0 comments Download
A LayoutTests/crypto/subtle/aes-ctr/cloneKey.html View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/aes-ctr/cloneKey-expected.txt View 2 1 chunk +79 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/aes-gcm/cloneKey.html View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/aes-gcm/cloneKey-expected.txt View 2 2 chunks +1 line, -211 lines 0 comments Download
A LayoutTests/crypto/subtle/aes-kw/cloneKey.html View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/aes-kw/cloneKey-expected.txt View 2 1 chunk +79 lines, -0 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-aesKey.html View 1 chunk +0 lines, -91 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-aesKey-expected.txt View 1 chunk +0 lines, -429 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-ecKey-private.html View 1 chunk +0 lines, -107 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-ecKey-private-expected.txt View 1 chunk +0 lines, -219 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-ecKey-public.html View 1 chunk +0 lines, -96 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-ecKey-public-expected.txt View 1 chunk +0 lines, -219 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-hkdfKey.html View 1 chunk +0 lines, -84 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-hkdfKey-expected.txt View 1 chunk +0 lines, -279 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-hmacKey.html View 1 chunk +0 lines, -96 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-hmacKey-empty.html View 1 chunk +0 lines, -34 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-hmacKey-empty-expected.txt View 1 chunk +0 lines, -16 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-hmacKey-expected.txt View 1 chunk +0 lines, -711 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-pbkdf2Key.html View 1 chunk +0 lines, -85 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-pbkdf2Key-expected.txt View 1 chunk +0 lines, -414 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-rsaHashedKey-private.html View 1 chunk +0 lines, -100 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-rsaHashedKey-private-expected.txt View 1 chunk +0 lines, -267 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-rsaHashedKey-public.html View 1 chunk +0 lines, -100 lines 0 comments Download
D LayoutTests/crypto/subtle/clone-rsaHashedKey-public-expected.txt View 1 chunk +0 lines, -525 lines 0 comments Download
A LayoutTests/crypto/subtle/ecdh/cloneKey.html View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/ecdh/cloneKey-expected.txt View 1 2 4 chunks +76 lines, -76 lines 0 comments Download
A LayoutTests/crypto/subtle/ecdsa/cloneKey.html View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/ecdsa/cloneKey-expected.txt View 1 2 12 chunks +147 lines, -42 lines 0 comments Download
A LayoutTests/crypto/subtle/hkdf/cloneKey.html View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/hkdf/cloneKey-expected.txt View 1 2 1 chunk +684 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/hmac/cloneKey.html View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/hmac/cloneKey-empty.html View 1 chunk +2 lines, -2 lines 0 comments Download
A + LayoutTests/crypto/subtle/hmac/cloneKey-empty-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/crypto/subtle/hmac/cloneKey-expected.txt View 1 2 1 chunk +1413 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/pbkdf2/cloneKey.html View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/pbkdf2/cloneKey-expected.txt View 1 2 10 chunks +270 lines, -0 lines 0 comments Download
A LayoutTests/crypto/subtle/resources/ec-cloneKey.js View 1 2 1 chunk +110 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/resources/rsa-cloneKey.js View 1 2 3 chunks +32 lines, -51 lines 0 comments Download
A + LayoutTests/crypto/subtle/resources/symmetric-cloneKey.js View 1 2 3 4 chunks +27 lines, -44 lines 0 comments Download
A LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/cloneKey.html View 1 2 1 chunk +28 lines, -0 lines 0 comments Download
A + LayoutTests/crypto/subtle/rsassa-pkcs1-v1_5/cloneKey-expected.txt View 1 2 11 chunks +558 lines, -42 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
Habib Virji
It only contains cloneKey tests.
5 years, 9 months ago (2015-02-27 17:56:36 UTC) #2
eroman
I like the general direction of this change, however find that cloneKey.js is too complex ...
5 years, 9 months ago (2015-02-27 19:13:36 UTC) #3
eroman
Oh one more comment on organization: If we find we have lots of shared code ...
5 years, 9 months ago (2015-02-27 19:17:01 UTC) #4
Habib Virji
Thanks eroman for your suggestions. Have uploaded a new patch with division based on algorithm ...
5 years, 9 months ago (2015-03-03 17:23:44 UTC) #5
eroman
LGTM once you update the CL description (whose comments reference the old way of doing ...
5 years, 9 months ago (2015-03-05 19:58:51 UTC) #6
eroman
https://codereview.chromium.org/958353003/diff/40001/LayoutTests/crypto/subtle/resources/symmetric-cloneKey.js File LayoutTests/crypto/subtle/resources/symmetric-cloneKey.js (right): https://codereview.chromium.org/958353003/diff/40001/LayoutTests/crypto/subtle/resources/symmetric-cloneKey.js#newcode52 LayoutTests/crypto/subtle/resources/symmetric-cloneKey.js:52: function testCloneSymmetricKeys(algorithmName, possibleHashAlgorithms, possibleExtractable, possibleKeyUsages, possibleKeyData) I believe we ...
5 years, 9 months ago (2015-03-05 20:22:50 UTC) #7
Habib Virji
Sorry has been bit sluggish last week. Updated with as per the review: New parameter ...
5 years, 9 months ago (2015-03-09 12:04:09 UTC) #8
eroman
lgtm https://codereview.chromium.org/958353003/diff/60001/LayoutTests/crypto/subtle/hkdf/cloneKey.html File LayoutTests/crypto/subtle/hkdf/cloneKey.html (right): https://codereview.chromium.org/958353003/diff/60001/LayoutTests/crypto/subtle/hkdf/cloneKey.html#newcode25 LayoutTests/crypto/subtle/hkdf/cloneKey.html:25: testCloneSymmetricKeys('HKDF', kPossibleHashAlgorithms, kPossibleExtractable, kPossibleKeyUsage, kKeyData).then(finishJSTest, failAndFinishJSTest); Can you ...
5 years, 9 months ago (2015-03-10 00:11:06 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/958353003/80001
5 years, 9 months ago (2015-03-12 10:30:36 UTC) #12
Habib Virji
Addressed all the comments. Thanks.
5 years, 9 months ago (2015-03-12 10:30:50 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:80001) as https://src.chromium.org/viewvc/blink?view=rev&revision=191772
5 years, 9 months ago (2015-03-12 13:25:48 UTC) #14
eroman
5 years, 9 months ago (2015-03-12 17:40:06 UTC) #15
Message was sent while issue was closed.
committed patchset LGTM

Powered by Google App Engine
This is Rietveld 408576698