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

Issue 884073002: Implement chrome.platformKeys.getKeyPair(). (Closed)

Created:
5 years, 10 months ago by pneubeck (no reviews)
Modified:
5 years, 10 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, erikwright+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@cert_impl2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement chrome.platformKeys.getKeyPair(). This also makes the chrome.platformKeys.subtleCrypto().sign() working. Second change after https://codereview.chromium.org/875373002/ to implement chrome.platformKeys. Still missing: per extension key permissions and UI changes. BUG=450167 R=asvitkine@chromium.org, kaliamoorthi@chromium.org, kalman@chromium.org, rsleevi@chromium.org TBR=arv@chromium.org (for .grd change) Committed: https://chromium.googlesource.com/chromium/src/+/594333f07c9d287c268f4d04259f74e08fc20bb9

Patch Set 1 : [Upload incl. upstream for running test bots] #

Patch Set 2 : #

Patch Set 3 : Rebased. #

Total comments: 28

Patch Set 4 : Addressed some of Ryan's comments. #

Patch Set 5 : Rebased. #

Patch Set 6 : Check public exponent. #

Patch Set 7 : Moving binary data to files. Loading them by XHR. #

Patch Set 8 : Bundled Sign() arguments into a struct. Renamed to SignRSA. #

Total comments: 15

Patch Set 9 : Addressed comments. Enforce explicit initialization of SignRSAParams. #

Patch Set 10 : Fix comments in basic.js. Simplify key retrieval. #

Total comments: 1

Patch Set 11 : Reupload #

Total comments: 10

Patch Set 12 : Removed SignRSAParams and GetPublicKeyResult. #

Patch Set 13 : Fix typo in basic.js. #

Total comments: 24

Patch Set 14 : Addressed comments. #

Patch Set 15 : Updated histogram. #

Total comments: 4

Patch Set 16 : Addressed comments. #

Patch Set 17 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+799 lines, -298 lines) Patch
M chrome/browser/chromeos/platform_keys/platform_keys.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +39 lines, -20 lines 0 comments Download
M chrome/browser/chromeos/platform_keys/platform_keys_nss.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 chunks +175 lines, -65 lines 0 comments Download
M chrome/browser/chromeos/platform_keys/platform_keys_service.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +34 lines, -17 lines 0 comments Download
M chrome/browser/chromeos/platform_keys/platform_keys_service.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +52 lines, -29 lines 0 comments Download
M chrome/browser/extensions/api/platform_keys/platform_keys_api.h View 1 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/platform_keys/platform_keys_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +125 lines, -20 lines 0 comments Download
M chrome/common/extensions/api/platform_keys_internal.idl View 1 2 3 4 5 6 7 3 chunks +17 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/platform_keys_natives.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +20 lines, -3 lines 0 comments Download
A chrome/renderer/resources/extensions/platform_keys/get_public_key.js View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/platform_keys/internal_api.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/platform_keys_custom_bindings.js View 1 2 3 1 chunk +35 lines, -1 line 0 comments Download
M chrome/renderer/resources/renderer_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/platform_keys/basic.js View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +229 lines, -141 lines 0 comments Download
A chrome/test/data/extensions/api_test/platform_keys/client_1.der View 1 2 3 4 5 6 Binary file 0 comments Download
A chrome/test/data/extensions/api_test/platform_keys/client_1_issuer_dn.der View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/platform_keys/client_1_spki.der View 1 2 3 4 5 6 Binary file 0 comments Download
A chrome/test/data/extensions/api_test/platform_keys/client_2.der View 1 2 3 4 5 6 Binary file 0 comments Download
A chrome/test/data/extensions/api_test/platform_keys/data View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/platform_keys/signature_nohash_pkcs View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/platform_keys/signature_sha1_pkcs View 1 2 3 4 5 6 Binary file 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 63 (29 generated)
pneubeck (no reviews)
second part of the implementation. ptal
5 years, 10 months ago (2015-01-29 15:17:24 UTC) #8
eroman
TBH I am not very experienced with crypto, probably not the best reviewer. Ryan, would ...
5 years, 10 months ago (2015-01-30 17:54:13 UTC) #10
pneubeck (no reviews)
@Bartosz, and this one third.
5 years, 10 months ago (2015-02-02 10:34:40 UTC) #12
pneubeck (no reviews)
-Bartosz, +Thiemo
5 years, 10 months ago (2015-02-02 12:37:39 UTC) #14
Ryan Sleevi
https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys.h File chrome/browser/chromeos/platform_keys/platform_keys.h (right): https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys.h#newcode37 chrome/browser/chromeos/platform_keys/platform_keys.h:37: HASH_ALGORITHM_NONE, Needs documentation about expected behaviours (you've got it ...
5 years, 10 months ago (2015-02-03 01:44:51 UTC) #15
pneubeck (no reviews)
https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys.h File chrome/browser/chromeos/platform_keys/platform_keys.h (right): https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys.h#newcode61 chrome/browser/chromeos/platform_keys/platform_keys.h:61: std::vector<char> public_key_spki_der; On 2015/02/03 01:44:50, Ryan Sleevi wrote: > ...
5 years, 10 months ago (2015-02-03 10:48:18 UTC) #16
pneubeck (no reviews)
https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys.h File chrome/browser/chromeos/platform_keys/platform_keys.h (right): https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys.h#newcode57 chrome/browser/chromeos/platform_keys/platform_keys.h:57: struct PublicKeyInfo { On 2015/02/03 01:44:50, Ryan Sleevi wrote: ...
5 years, 10 months ago (2015-02-03 20:15:01 UTC) #18
pneubeck (no reviews)
https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc File chrome/browser/chromeos/platform_keys/platform_keys_nss.cc (right): https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc#newcode761 chrome/browser/chromeos/platform_keys/platform_keys_nss.cc:761: // TODO(pneubeck): Verify that the public exponent equals 65537. ...
5 years, 10 months ago (2015-02-04 20:59:20 UTC) #20
pneubeck (no reviews)
@Ryan, I should have addressed all of your feedback now. ptal. https://codereview.chromium.org/884073002/diff/160001/chrome/browser/chromeos/platform_keys/platform_keys.h File chrome/browser/chromeos/platform_keys/platform_keys.h (right): ...
5 years, 10 months ago (2015-02-05 10:41:57 UTC) #21
pneubeck (no reviews)
@Ryan, ping @Benjamin, ptal at chrome/common/extensions/api/platform_keys_internal.idl chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc chrome/renderer/extensions/platform_keys_natives.cc chrome/renderer/resources/extensions/platform_keys_custom_bindings.js
5 years, 10 months ago (2015-02-06 09:07:39 UTC) #23
not at google - send to devlin
extension mechanics lgtm, I can't review the functionality of course.
5 years, 10 months ago (2015-02-06 18:24:52 UTC) #25
Ryan Sleevi
I have not reviewed the JS tests, and I get the feeling from Ben's reply ...
5 years, 10 months ago (2015-02-07 02:09:41 UTC) #27
pneubeck (no reviews)
https://codereview.chromium.org/884073002/diff/280001/chrome/browser/chromeos/platform_keys/platform_keys.h File chrome/browser/chromeos/platform_keys/platform_keys.h (right): https://codereview.chromium.org/884073002/diff/280001/chrome/browser/chromeos/platform_keys/platform_keys.h#newcode55 chrome/browser/chromeos/platform_keys/platform_keys.h:55: bool sign_direct_pkcs_padded = false; The possibility of using this ...
5 years, 10 months ago (2015-02-08 10:52:00 UTC) #31
pneubeck (no reviews)
On 2015/02/07 02:09:41, Ryan Sleevi wrote: > I have not reviewed the JS tests, and ...
5 years, 10 months ago (2015-02-08 10:54:16 UTC) #32
pneubeck (no reviews)
@Ryan, ptal whether your comments were addressed. Thanks.
5 years, 10 months ago (2015-02-08 10:55:11 UTC) #33
pneubeck (no reviews)
-Eric @Prabhu, ptal at the tests in basic.js & apitest_nss.cc . Thanks.
5 years, 10 months ago (2015-02-08 15:11:06 UTC) #35
pneubeck (no reviews)
https://codereview.chromium.org/884073002/diff/280001/chrome/test/data/extensions/api_test/platform_keys/basic.js File chrome/test/data/extensions/api_test/platform_keys/basic.js (right): https://codereview.chromium.org/884073002/diff/280001/chrome/test/data/extensions/api_test/platform_keys/basic.js#newcode29 chrome/test/data/extensions/api_test/platform_keys/basic.js:29: // The public key of clientCert1 as Subject Public ...
5 years, 10 months ago (2015-02-08 15:52:07 UTC) #37
kaliamoorthi
LGTM for basic.js after fixing nit. https://codereview.chromium.org/884073002/diff/360001/chrome/test/data/extensions/api_test/platform_keys/basic.js File chrome/test/data/extensions/api_test/platform_keys/basic.js (right): https://codereview.chromium.org/884073002/diff/360001/chrome/test/data/extensions/api_test/platform_keys/basic.js#newcode51 chrome/test/data/extensions/api_test/platform_keys/basic.js:51: // Reads the ...
5 years, 10 months ago (2015-02-09 13:37:56 UTC) #39
Ryan Sleevi
https://codereview.chromium.org/884073002/diff/280001/chrome/browser/chromeos/platform_keys/platform_keys.h File chrome/browser/chromeos/platform_keys/platform_keys.h (right): https://codereview.chromium.org/884073002/diff/280001/chrome/browser/chromeos/platform_keys/platform_keys.h#newcode90 chrome/browser/chromeos/platform_keys/platform_keys.h:90: }; On 2015/02/08 10:52:00, pneubeck wrote: > On 2015/02/07 ...
5 years, 10 months ago (2015-02-10 00:59:33 UTC) #40
pneubeck (no reviews)
@Ryan, ptal https://codereview.chromium.org/884073002/diff/400001/chrome/browser/chromeos/platform_keys/platform_keys.h File chrome/browser/chromeos/platform_keys/platform_keys.h (right): https://codereview.chromium.org/884073002/diff/400001/chrome/browser/chromeos/platform_keys/platform_keys.h#newcode45 chrome/browser/chromeos/platform_keys/platform_keys.h:45: class SignRSAParams { On 2015/02/10 00:59:32, Ryan ...
5 years, 10 months ago (2015-02-10 10:40:52 UTC) #43
not at google - send to devlin
Ryan, why aren't you capable of reviewing the JS tests? I had a go and ...
5 years, 10 months ago (2015-02-10 20:37:08 UTC) #44
Ryan Sleevi
On 2015/02/10 20:37:08, kalman wrote: > Ryan, why aren't you capable of reviewing the JS ...
5 years, 10 months ago (2015-02-10 20:46:03 UTC) #45
Ryan Sleevi
It seems "git cl" & the CQ now support binary files. They're a little bit ...
5 years, 10 months ago (2015-02-10 21:25:28 UTC) #46
pneubeck (no reviews)
https://codereview.chromium.org/884073002/diff/460001/chrome/browser/chromeos/platform_keys/platform_keys.h File chrome/browser/chromeos/platform_keys/platform_keys.h (right): https://codereview.chromium.org/884073002/diff/460001/chrome/browser/chromeos/platform_keys/platform_keys.h#newcode120 chrome/browser/chromeos/platform_keys/platform_keys.h:120: // not equal to 65537. On 2015/02/10 21:25:28, Ryan ...
5 years, 10 months ago (2015-02-11 14:37:05 UTC) #47
pneubeck (no reviews)
@Ryan, please take a look at the last patch set. Prabhu reviewed basic.js and platform_keys_apitest_nss.cc ...
5 years, 10 months ago (2015-02-11 15:57:51 UTC) #48
pneubeck (no reviews)
asvitkine@chromium.org: Please review the histogram changes. Thanks.
5 years, 10 months ago (2015-02-12 09:32:31 UTC) #50
Alexei Svitkine (slow)
lgtm
5 years, 10 months ago (2015-02-12 15:33:46 UTC) #52
Ryan Sleevi
LGTM. Thanks for putting up with my pedantry. https://codereview.chromium.org/884073002/diff/460001/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc File chrome/browser/extensions/api/platform_keys/platform_keys_api.cc (right): https://codereview.chromium.org/884073002/diff/460001/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc#newcode53 chrome/browser/extensions/api/platform_keys/platform_keys_api.cc:53: const ...
5 years, 10 months ago (2015-02-13 03:24:28 UTC) #53
pneubeck (no reviews)
https://codereview.chromium.org/884073002/diff/500001/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc File chrome/browser/chromeos/platform_keys/platform_keys_nss.cc (right): https://codereview.chromium.org/884073002/diff/500001/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc#newcode460 chrome/browser/chromeos/platform_keys/platform_keys_nss.cc:460: "Can't reinterpret data if it's characters are not 8 ...
5 years, 10 months ago (2015-02-13 05:52:20 UTC) #54
pneubeck (no reviews)
I'll go ahead an commit this. If you have any further comments I can do ...
5 years, 10 months ago (2015-02-14 13:25:14 UTC) #55
pneubeck (no reviews)
https://codereview.chromium.org/884073002/diff/460001/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc File chrome/browser/extensions/api/platform_keys/platform_keys_api.cc (right): https://codereview.chromium.org/884073002/diff/460001/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc#newcode53 chrome/browser/extensions/api/platform_keys/platform_keys_api.cc:53: const char defaultPublicExponent[] = {0x01, 0x00, 0x01}; On 2015/02/14 ...
5 years, 10 months ago (2015-02-14 13:31:18 UTC) #56
pneubeck (no reviews)
arv@chromium.org: Please review changes in chrome/renderer/resources/renderer_resources.grd
5 years, 10 months ago (2015-02-14 13:36:18 UTC) #59
commit-bot: I haz the power
Patchset 17 (id:??) landed as https://crrev.com/594333f07c9d287c268f4d04259f74e08fc20bb9 Cr-Commit-Position: refs/heads/master@{#316386}
5 years, 10 months ago (2015-02-14 13:45:17 UTC) #62
pneubeck (no reviews)
5 years, 10 months ago (2015-02-14 13:45:26 UTC) #63
Message was sent while issue was closed.
Committed patchset #17 (id:540001) manually as
594333f07c9d287c268f4d04259f74e08fc20bb9 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698