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

Issue 282133002: [webcryto] Validate key usages during key creation. (Closed)

Created:
6 years, 7 months ago by eroman
Modified:
6 years, 7 months ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, darin-cc_chromium.org, jam
Visibility:
Public.

Description

[webcryto] Validate key usages during key creation. (1) Key creation (whether by importKey(), unwrapKey(), generateKey() now fails if the requested key usages are not applicable (for instance asking for 'sign' on an AES-CBC key). (2) When generating a key pair, the public/private key get the intersection of supported usages and requested ones. (3) The exceptions thrown during the import phase of unwrapKey() are now surfaced to the caller (bug 372944) BUG=372040, 372944, 245025 R=rsleevi@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272630

Patch Set 1 : #

Total comments: 12

Patch Set 2 : Fail-fast rather than verifying usages after import #

Patch Set 3 : Remove some DCHECK()s which no longer apply #

Patch Set 4 : Rebase onto master #

Patch Set 5 : Rebase onto removal of rsa-es changelist #

Patch Set 6 : rebase on master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+609 lines, -113 lines) Patch
M content/child/webcrypto/jwk.cc View 1 2 3 4 3 chunks +14 lines, -10 lines 0 comments Download
M content/child/webcrypto/platform_crypto.h View 1 2 3 4 8 chunks +12 lines, -1 line 0 comments Download
M content/child/webcrypto/platform_crypto_nss.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M content/child/webcrypto/platform_crypto_openssl.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/child/webcrypto/shared_crypto.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/child/webcrypto/shared_crypto.cc View 1 2 3 4 8 chunks +177 lines, -7 lines 0 comments Download
M content/child/webcrypto/shared_crypto_unittest.cc View 1 2 3 4 20 chunks +366 lines, -77 lines 0 comments Download
M content/child/webcrypto/status.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M content/child/webcrypto/status.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M content/child/webcrypto/webcrypto_impl.cc View 1 2 3 4 3 chunks +2 lines, -9 lines 0 comments Download
M content/child/webcrypto/webcrypto_util.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M content/child/webcrypto/webcrypto_util.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
eroman
6 years, 7 months ago (2014-05-15 01:54:50 UTC) #1
Ryan Sleevi
Blergh. This CL conflicts with my CL is just about every place imaginable. Thoughts below ...
6 years, 7 months ago (2014-05-15 06:29:40 UTC) #2
eroman
https://codereview.chromium.org/282133002/diff/30001/content/child/webcrypto/shared_crypto.cc File content/child/webcrypto/shared_crypto.cc (right): https://codereview.chromium.org/282133002/diff/30001/content/child/webcrypto/shared_crypto.cc#newcode607 content/child/webcrypto/shared_crypto.cc:607: case blink::WebCryptoKeyTypePublic: On 2014/05/15 06:29:40, Ryan Sleevi wrote: > ...
6 years, 7 months ago (2014-05-16 00:04:37 UTC) #3
Ryan Sleevi
https://codereview.chromium.org/282133002/diff/30001/content/child/webcrypto/shared_crypto.cc File content/child/webcrypto/shared_crypto.cc (right): https://codereview.chromium.org/282133002/diff/30001/content/child/webcrypto/shared_crypto.cc#newcode607 content/child/webcrypto/shared_crypto.cc:607: case blink::WebCryptoKeyTypePublic: On 2014/05/16 00:04:37, eroman wrote: > On ...
6 years, 7 months ago (2014-05-19 23:06:29 UTC) #4
eroman
https://codereview.chromium.org/282133002/diff/30001/content/child/webcrypto/shared_crypto.cc File content/child/webcrypto/shared_crypto.cc (right): https://codereview.chromium.org/282133002/diff/30001/content/child/webcrypto/shared_crypto.cc#newcode654 content/child/webcrypto/shared_crypto.cc:654: *private_key_usages = combined_usage_mask & all_private_key_usages; On 2014/05/19 23:06:29, Ryan ...
6 years, 7 months ago (2014-05-20 00:32:19 UTC) #5
eroman
https://codereview.chromium.org/282133002/diff/30001/content/child/webcrypto/shared_crypto.cc File content/child/webcrypto/shared_crypto.cc (right): https://codereview.chromium.org/282133002/diff/30001/content/child/webcrypto/shared_crypto.cc#newcode810 content/child/webcrypto/shared_crypto.cc:810: format, key_data, algorithm, extractable, usage_mask, key); On 2014/05/19 23:06:29, ...
6 years, 7 months ago (2014-05-20 01:27:57 UTC) #6
eroman
PTAL, I have switched to fail-fast, I agree that approach is better. I also ended ...
6 years, 7 months ago (2014-05-20 22:37:10 UTC) #7
eroman
ping
6 years, 7 months ago (2014-05-22 21:38:15 UTC) #8
Ryan Sleevi
lgtm
6 years, 7 months ago (2014-05-22 21:52:12 UTC) #9
eroman
The CQ bit was checked by eroman@chromium.org
6 years, 7 months ago (2014-05-23 19:23:00 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eroman@chromium.org/282133002/160001
6 years, 7 months ago (2014-05-23 19:24:28 UTC) #11
eroman
6 years, 7 months ago (2014-05-23 23:13:54 UTC) #12
Message was sent while issue was closed.
Committed patchset #6 manually as r272630 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698