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

Issue 18033004: WebCrypto: Add WebKit API structure for keys. (Closed)

Created:
7 years, 5 months ago by eroman
Modified:
7 years, 5 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, jamesr, eae+blinkwatch, tommyw+watchlist_chromium.org, dglazkov+blink, jeez, Ryan Sleevi
Visibility:
Public.

Description

WebCrypto: Add WebKit API structure for keys. This corresponds to the "Key interface" in the spec: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#key-interface This changelist introduces "WebCryptoKey" as a reference-counted wrapper to an opaque key handle. This opaque key handle is a pointer created by the embedder, which derives from WebCryptoKeyHandle. Testing: This change does not have any accompanying tests, as there isn't a way to create key objects from Javascript yet. These interfaces will get test coverage once key generation is hooked up. BUG=245025 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=153657

Patch Set 1 : #

Total comments: 15

Patch Set 2 : address abarth's comments #

Patch Set 3 : TEMPORARY: explore alternate implementations for building keyUsage() Vector #

Total comments: 3

Patch Set 4 : Switch to first of the alternate implementations #

Patch Set 5 : Add a FIXME for returning the same array #

Patch Set 6 : bugfix: move createAlgorithm() --> Algorithm::create(), since Key depends on it #

Patch Set 7 : rebase onto master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+346 lines, -76 lines) Patch
M Source/core/core.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A + Source/core/platform/chromium/support/WebCryptoKey.cpp View 1 chunk +30 lines, -30 lines 0 comments Download
M Source/modules/crypto/Algorithm.h View 1 2 3 4 5 2 chunks +2 lines, -5 lines 0 comments Download
M Source/modules/crypto/Algorithm.cpp View 1 2 3 4 5 1 chunk +19 lines, -4 lines 0 comments Download
M Source/modules/crypto/CryptoOperation.cpp View 1 2 3 4 5 2 chunks +1 line, -21 lines 0 comments Download
A + Source/modules/crypto/Key.h View 1 chunk +17 lines, -8 lines 0 comments Download
A Source/modules/crypto/Key.cpp View 1 2 3 4 1 chunk +120 lines, -0 lines 0 comments Download
A + Source/modules/crypto/Key.idl View 1 chunk +20 lines, -1 line 0 comments Download
M Source/modules/crypto/WorkerCrypto.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/modules/modules.gypi View 2 chunks +6 lines, -3 lines 0 comments Download
M public/platform/WebCryptoAlgorithm.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
A public/platform/WebCryptoKey.h View 1 2 1 chunk +128 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
eroman
https://codereview.chromium.org/18033004/diff/3001/Source/modules/crypto/Algorithm.cpp File Source/modules/crypto/Algorithm.cpp (right): https://codereview.chromium.org/18033004/diff/3001/Source/modules/crypto/Algorithm.cpp#newcode44 Source/modules/crypto/Algorithm.cpp:44: return ASCIILiteral(m_algorithm.algorithmName()); Unrelated cleanup. I can extract these to ...
7 years, 5 months ago (2013-07-03 02:22:57 UTC) #1
abarth-chromium
https://codereview.chromium.org/18033004/diff/3001/Source/modules/crypto/Algorithm.cpp File Source/modules/crypto/Algorithm.cpp (right): https://codereview.chromium.org/18033004/diff/3001/Source/modules/crypto/Algorithm.cpp#newcode44 Source/modules/crypto/Algorithm.cpp:44: return ASCIILiteral(m_algorithm.algorithmName()); On 2013/07/03 02:22:57, eroman wrote: > Unrelated ...
7 years, 5 months ago (2013-07-03 03:47:37 UTC) #2
abarth-chromium
https://codereview.chromium.org/18033004/diff/3001/Source/modules/crypto/Algorithm.cpp File Source/modules/crypto/Algorithm.cpp (right): https://codereview.chromium.org/18033004/diff/3001/Source/modules/crypto/Algorithm.cpp#newcode44 Source/modules/crypto/Algorithm.cpp:44: return ASCIILiteral(m_algorithm.algorithmName()); On 2013/07/03 03:47:37, abarth wrote: > On ...
7 years, 5 months ago (2013-07-03 04:07:00 UTC) #3
eroman
My understanding is that ASCIILiteral() creates a String which does not have to copy the ...
7 years, 5 months ago (2013-07-03 04:13:55 UTC) #4
abarth-chromium
Yeah, you're right. I was thinking about another place we do something similar.
7 years, 5 months ago (2013-07-03 04:16:57 UTC) #5
abarth-chromium
LGTM modulo the minor issue about keyUsage in the IDL. We can land this CL ...
7 years, 5 months ago (2013-07-03 18:01:41 UTC) #6
eroman
https://codereview.chromium.org/18033004/diff/3001/Source/modules/crypto/Key.cpp File Source/modules/crypto/Key.cpp (right): https://codereview.chromium.org/18033004/diff/3001/Source/modules/crypto/Key.cpp#newcode72 Source/modules/crypto/Key.cpp:72: return 0; On 2013/07/03 18:01:41, abarth wrote: > ASSERT_NOT_REACHED(); ...
7 years, 5 months ago (2013-07-03 19:18:06 UTC) #7
abarth-chromium
On 2013/07/03 19:18:06, eroman wrote: > In summary: I can add an ASSERT_NOT_REACHED() here, however ...
7 years, 5 months ago (2013-07-03 20:44:34 UTC) #8
eroman
I uploaded 2 alternate implementations in patchset (3), both of which avoid creating an enum ...
7 years, 5 months ago (2013-07-03 21:14:30 UTC) #9
abarth-chromium
https://codereview.chromium.org/18033004/diff/23001/Source/modules/crypto/Key.cpp File Source/modules/crypto/Key.cpp (right): https://codereview.chromium.org/18033004/diff/23001/Source/modules/crypto/Key.cpp#newcode109 Source/modules/crypto/Key.cpp:109: for (int i = 0; (1 << i) <= ...
7 years, 5 months ago (2013-07-03 21:22:54 UTC) #10
abarth-chromium
On 2013/07/03 21:14:30, eroman wrote: > Regarding the read-only array issue: how about I leave ...
7 years, 5 months ago (2013-07-03 21:23:18 UTC) #11
eroman
https://codereview.chromium.org/18033004/diff/23001/Source/modules/crypto/Key.cpp File Source/modules/crypto/Key.cpp (right): https://codereview.chromium.org/18033004/diff/23001/Source/modules/crypto/Key.cpp#newcode119 Source/modules/crypto/Key.cpp:119: // must also update this function. On 2013/07/03 21:22:54, ...
7 years, 5 months ago (2013-07-03 21:35:18 UTC) #12
abarth-chromium
lgtm
7 years, 5 months ago (2013-07-03 21:38:44 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/18033004/39001
7 years, 5 months ago (2013-07-08 00:26:40 UTC) #14
commit-bot: I haz the power
7 years, 5 months ago (2013-07-08 01:47:48 UTC) #15
Message was sent while issue was closed.
Change committed as 153657

Powered by Google App Engine
This is Rietveld 408576698