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

Issue 384413004: Remove default key slot from KeygenHandler. (Closed)

Created:
6 years, 5 months ago by pneubeck (no reviews)
Modified:
6 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Remove default key slot from KeygenHandler. KeygenHandler defaulted to use the persistent key slot. However, the Handler is also used in ChromeOS where no such global persistent slot exists. This change removes this default behavior from KeygenHandler. Instead only the slot provided by the CryptoModuleDelegate will be used. If no CryptoModuleDelegate is set, then an error will be thrown on keygen usage. The unit test of KeygenHandler now explicitly provides the slot through a StubCryptoModuleDelegate. In a follow up, the crypto::GetPersistentNSSKeySlot() call will be removed from the unit tests as well and instead the test slot will be get()'ed from the ScopedTestNSSDB. BUG=210525 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283634

Patch Set 1 : #

Total comments: 10

Patch Set 2 : Fixed compilation, addressed suggestions. #

Total comments: 1

Patch Set 3 : Added a comment. #

Patch Set 4 : Adapted build dependencies. #

Patch Set 5 : Pass scoped instead of raw slot pointer. #

Patch Set 6 : Pass the KeygenHandler in the ShellResourceContext impl. #

Patch Set 7 : Fixing android_webview. #

Total comments: 3

Patch Set 8 : Less invasive approach. #

Total comments: 4

Patch Set 9 : Addressed comments: adding ifdefs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -28 lines) Patch
M net/base/keygen_handler_nss.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -13 lines 0 comments Download
M net/base/keygen_handler_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +53 lines, -15 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
pneubeck (no reviews)
Maybe you want to take an early look at this one (I didn't get to ...
6 years, 5 months ago (2014-07-14 21:37:57 UTC) #1
Ryan Sleevi
https://codereview.chromium.org/384413004/diff/40001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/384413004/diff/40001/chrome/browser/profiles/profile_io_data.cc#newcode331 chrome/browser/profiles/profile_io_data.cc:331: keygen_handler->set_key_slot(slot.get()); BUG?: This may potentially close |slot|. Should we ...
6 years, 5 months ago (2014-07-14 21:54:25 UTC) #2
pneubeck (no reviews)
https://codereview.chromium.org/384413004/diff/40001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/384413004/diff/40001/chrome/browser/profiles/profile_io_data.cc#newcode331 chrome/browser/profiles/profile_io_data.cc:331: keygen_handler->set_key_slot(slot.get()); On 2014/07/14 21:54:24, Ryan Sleevi wrote: > BUG?: ...
6 years, 5 months ago (2014-07-15 13:22:22 UTC) #3
pneubeck (no reviews)
https://codereview.chromium.org/384413004/diff/140001/net/base/keygen_handler.h File net/base/keygen_handler.h (right): https://codereview.chromium.org/384413004/diff/140001/net/base/keygen_handler.h#newcode17 net/base/keygen_handler.h:17: #include "crypto/scoped_nss_types.h" hmpf. This leaks nss includes into content/shell ...
6 years, 5 months ago (2014-07-15 14:07:28 UTC) #4
Ryan Sleevi
https://codereview.chromium.org/384413004/diff/40001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/384413004/diff/40001/chrome/browser/profiles/profile_io_data.cc#newcode331 chrome/browser/profiles/profile_io_data.cc:331: keygen_handler->set_key_slot(slot.get()); On 2014/07/15 13:22:21, pneubeck wrote: > On 2014/07/14 ...
6 years, 5 months ago (2014-07-15 14:34:21 UTC) #5
pneubeck (no reviews)
ptal
6 years, 5 months ago (2014-07-15 15:13:50 UTC) #6
pneubeck (no reviews)
sky@ please take a look at: content/browser content/public pfeldman@ please take a look at the ...
6 years, 5 months ago (2014-07-15 16:14:53 UTC) #7
sky
LGTM note that I'm not an owner of content/public/browser/resource_context.h .
6 years, 5 months ago (2014-07-15 16:48:58 UTC) #8
pneubeck (no reviews)
avi@ please take a look at the change in content/public/browser/resource_context.h
6 years, 5 months ago (2014-07-15 20:46:51 UTC) #9
pneubeck (no reviews)
brettw@ please take a look at the change in content/public/browser/resource_context.h mnaganov@ please review the android ...
6 years, 5 months ago (2014-07-15 21:09:25 UTC) #10
Ryan Sleevi
So, a bit more about the design here: The original, preexisting code uses the NSSCryptoModuleDelegate ...
6 years, 5 months ago (2014-07-15 21:22:33 UTC) #11
mnaganov (inactive)
android_webview LGTM
6 years, 5 months ago (2014-07-15 21:23:22 UTC) #12
pneubeck (no reviews)
2nd much less invasive attempt. Not sure why I didn't do this in the first ...
6 years, 5 months ago (2014-07-16 07:21:07 UTC) #13
Ryan Sleevi
https://codereview.chromium.org/384413004/diff/270001/net/base/keygen_handler_unittest.cc File net/base/keygen_handler_unittest.cc (right): https://codereview.chromium.org/384413004/diff/270001/net/base/keygen_handler_unittest.cc#newcode30 net/base/keygen_handler_unittest.cc:30: class StubCryptoModuleDelegate : public crypto::NSSCryptoModuleDelegate { #ifdefs ? https://codereview.chromium.org/384413004/diff/270001/net/base/keygen_handler_unittest.cc#newcode61 ...
6 years, 5 months ago (2014-07-16 20:05:43 UTC) #14
pneubeck (no reviews)
https://codereview.chromium.org/384413004/diff/270001/net/base/keygen_handler_unittest.cc File net/base/keygen_handler_unittest.cc (right): https://codereview.chromium.org/384413004/diff/270001/net/base/keygen_handler_unittest.cc#newcode61 net/base/keygen_handler_unittest.cc:61: crypto::ScopedPK11Slot(crypto::GetPersistentNSSKeySlot())))); On 2014/07/16 20:05:42, Ryan Sleevi wrote: > Depending ...
6 years, 5 months ago (2014-07-16 20:19:50 UTC) #15
Ryan Sleevi
lgtm
6 years, 5 months ago (2014-07-16 20:25:47 UTC) #16
pneubeck (no reviews)
Updated the commit message as well. https://codereview.chromium.org/384413004/diff/270001/net/base/keygen_handler_unittest.cc File net/base/keygen_handler_unittest.cc (right): https://codereview.chromium.org/384413004/diff/270001/net/base/keygen_handler_unittest.cc#newcode30 net/base/keygen_handler_unittest.cc:30: class StubCryptoModuleDelegate : ...
6 years, 5 months ago (2014-07-16 20:40:19 UTC) #17
pneubeck (no reviews)
The CQ bit was checked by pneubeck@chromium.org
6 years, 5 months ago (2014-07-16 20:40:57 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@chromium.org/384413004/290001
6 years, 5 months ago (2014-07-16 20:42:36 UTC) #19
commit-bot: I haz the power
6 years, 5 months ago (2014-07-17 04:05:16 UTC) #20
Message was sent while issue was closed.
Change committed as 283634

Powered by Google App Engine
This is Rietveld 408576698