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

Issue 18475002: WebCrypto: Add framework for AlgorithmIdentifier normalization. (Closed)

Created:
7 years, 5 months ago by eroman
Modified:
7 years, 5 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, Nils Barth (inactive), jamesr, jsbell+bindings_chromium.org, eae+blinkwatch, tommyw+watchlist_chromium.org, abarth-chromium, marja+watch_chromium.org, dglazkov+blink, adamk+blink_chromium.org, haraken, Nate Chapin, jeez, do-not-use, Ryan Sleevi
Visibility:
Public.

Description

WebCrypto: Add framework for AlgorithmIdentifier normalization. In this changelist, the "normalizeAlgorithm()" function corresponds with https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#algorithm-normalizing-rules A threadsafe and copiable representation of the normalized algorithm has been added to the WebKit API as WebCryptoAlgorithm. This is how WebCore will inform the embedder of the cryptographic operation to perform and its parameters. WebCryptoAlgorithm is also used by WebCore to pass around normalized "algorithm identifiers". There is a lot of boiler plate to achieve both parsing of algorithm parameters from a dictionary, as well as reflecting back the normalized results to javascript. The parsing is done manually as it needs to extract from a Dictionary. The reflection back to javascript is done using IDL and some glue to WebCryptoAlgorithm. This changelist only adds a small number of algorithm parameters. (Enough to be minimally testable). The rest will follow in later changes. BUG=245025 R=abarth@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=153450

Patch Set 1 : #

Total comments: 90

Patch Set 2 : Address abarth's comments #

Patch Set 3 : rebase on master #

Patch Set 4 : fix compile issues on trybot #

Patch Set 5 : rename verify --> verifySignature (because "verify" is a macro on Mac) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+830 lines, -204 lines) Patch
A LayoutTests/crypto/normalize-algorithm.html View 1 chunk +116 lines, -0 lines 0 comments Download
A LayoutTests/crypto/normalize-algorithm-expected.txt View 1 chunk +37 lines, -0 lines 0 comments Download
M Source/bindings/bindings.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/Dictionary.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/Dictionary.cpp View 1 chunk +12 lines, -0 lines 0 comments Download
A + Source/bindings/v8/custom/V8AlgorithmCustom.cpp View 1 2 chunks +17 lines, -12 lines 0 comments Download
M Source/core/core.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp View 1 1 chunk +100 lines, -0 lines 0 comments Download
A + Source/modules/crypto/AesCbcParams.h View 1 1 chunk +12 lines, -10 lines 0 comments Download
A + Source/modules/crypto/AesCbcParams.cpp View 1 1 chunk +10 lines, -12 lines 0 comments Download
A + Source/modules/crypto/AesCbcParams.idl View 1 2 1 chunk +3 lines, -4 lines 0 comments Download
A + Source/modules/crypto/AesKeyGenParams.h View 1 1 chunk +10 lines, -10 lines 0 comments Download
A + Source/modules/crypto/AesKeyGenParams.cpp View 1 1 chunk +11 lines, -3 lines 0 comments Download
A + Source/modules/crypto/AesKeyGenParams.idl View 1 2 1 chunk +3 lines, -4 lines 0 comments Download
A + Source/modules/crypto/Algorithm.h View 1 2 chunks +15 lines, -7 lines 0 comments Download
A + Source/modules/crypto/Algorithm.cpp View 1 1 chunk +10 lines, -2 lines 0 comments Download
A + Source/modules/crypto/Algorithm.idl View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
A + Source/modules/crypto/CryptoOperation.h View 1 2 chunks +13 lines, -6 lines 0 comments Download
A + Source/modules/crypto/CryptoOperation.cpp View 1 1 chunk +25 lines, -24 lines 0 comments Download
A + Source/modules/crypto/CryptoOperation.idl View 1 2 1 chunk +3 lines, -4 lines 0 comments Download
M Source/modules/crypto/DOMWindowCrypto.cpp View 1 2 chunks +0 lines, -2 lines 0 comments Download
A + Source/modules/crypto/NormalizeAlgorithm.h View 1 1 chunk +24 lines, -13 lines 0 comments Download
A Source/modules/crypto/NormalizeAlgorithm.cpp View 1 2 3 1 chunk +231 lines, -0 lines 0 comments Download
M Source/modules/crypto/SubtleCrypto.h View 1 2 3 4 1 chunk +11 lines, -1 line 0 comments Download
M Source/modules/crypto/SubtleCrypto.cpp View 1 2 3 4 2 chunks +43 lines, -0 lines 0 comments Download
M Source/modules/crypto/SubtleCrypto.idl View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M Source/modules/crypto/WorkerGlobalScopeCrypto.cpp View 1 2 chunks +0 lines, -2 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 2 chunks +14 lines, -0 lines 0 comments Download
A + public/platform/WebCryptoAlgorithm.h View 1 2 chunks +49 lines, -50 lines 0 comments Download
A + public/platform/WebCryptoAlgorithmParams.h View 1 2 1 chunk +43 lines, -33 lines 0 comments Download
M public/platform/WebVector.h View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
eroman
https://codereview.chromium.org/18475002/diff/6001/public/platform/WebCryptoAlgorithm.h File public/platform/WebCryptoAlgorithm.h (right): https://codereview.chromium.org/18475002/diff/6001/public/platform/WebCryptoAlgorithm.h#newcode44 public/platform/WebCryptoAlgorithm.h:44: enum WebCryptoAlgorithmId { Note: I only included a few ...
7 years, 5 months ago (2013-07-02 06:06:52 UTC) #1
abarth-chromium
Please add more information to the description. For example, you can link to the spec ...
7 years, 5 months ago (2013-07-02 06:12:51 UTC) #2
eroman
Thanks Adam, apologies for the terseness! I have updated the CL description with more information. ...
7 years, 5 months ago (2013-07-02 06:24:38 UTC) #3
abarth-chromium
Thanks for updating the description. This CL is actually looks to be in pretty good ...
7 years, 5 months ago (2013-07-02 06:46:35 UTC) #4
eroman
Excellent thankyou! Nits are much appreciated, as I am still learning the way of the ...
7 years, 5 months ago (2013-07-02 07:00:27 UTC) #5
eroman
https://codereview.chromium.org/18475002/diff/6001/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp File Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp (right): https://codereview.chromium.org/18475002/diff/6001/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp#newcode37 Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp:37: #include <string.h> On 2013/07/02 06:46:36, abarth wrote: > Should ...
7 years, 5 months ago (2013-07-02 08:12:26 UTC) #6
eroman
https://codereview.chromium.org/18475002/diff/6001/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp File Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp (right): https://codereview.chromium.org/18475002/diff/6001/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp#newcode51 Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp:51: WebCryptoAlgorithmId algorithmId; On 2013/07/02 08:12:27, eroman wrote: > On ...
7 years, 5 months ago (2013-07-02 18:03:43 UTC) #7
abarth-chromium
lgtm Looks great! Thanks.
7 years, 5 months ago (2013-07-02 19:02:24 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/18475002/24002
7 years, 5 months ago (2013-07-02 19:02:38 UTC) #9
commit-bot: I haz the power
Retried try job too often on linux_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_layout_rel&number=14736
7 years, 5 months ago (2013-07-02 20:26:06 UTC) #10
eroman
The layout test failure on linux_layout_rel is happening for other commit queue attempts, so I ...
7 years, 5 months ago (2013-07-02 21:30:42 UTC) #11
eroman
7 years, 5 months ago (2013-07-02 21:56:58 UTC) #12
Message was sent while issue was closed.
Committed patchset #5 manually as r153450 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698