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

Issue 317613004: Remove usage of singleton software_slot_ in nss on ChromeOS (Closed)

Created:
6 years, 6 months ago by tbarzic
Modified:
6 years, 5 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Remove usage of singleton software_slot_ in nss on ChromeOS Instead of opening primary user's public slot separately, do it like it's done for other users: when InitializeNSSForChromeOSUser is called. This makes primary user's public slot state not dependent on chromeos::TPMTokenLoader. Also, with this, opening primary users public slot is not bound with enabling TPM anymore, so the slot may get open for guest user and on Linux ChromeOS. BUG=383663, 302062 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282817

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : splitoff browser test cleanup #

Patch Set 4 : . #

Patch Set 5 : . #

Total comments: 13

Patch Set 6 : . #

Total comments: 2

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : rebase #

Patch Set 10 : . #

Patch Set 11 : . #

Total comments: 17

Patch Set 12 : . #

Patch Set 13 : . #

Total comments: 6

Patch Set 14 : method renames #

Total comments: 2

Patch Set 15 : split GetAndSetStartInitTPMForCHormeOSUser #

Patch Set 16 : . #

Patch Set 17 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+177 lines, -139 lines) Patch
M chrome/browser/chromeos/login/auth/parallel_authenticator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/auth/parallel_authenticator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +25 lines, -11 lines 0 comments Download
M chrome/browser/chromeos/ownership/owner_settings_service.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/ownership/owner_settings_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +36 lines, -15 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +19 lines, -16 lines 0 comments Download
M chromeos/tpm_token_loader.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chromeos/tpm_token_loader.cc View 1 2 3 4 5 6 7 8 9 5 chunks +7 lines, -18 lines 0 comments Download
M crypto/nss_util.h View 1 chunk +0 lines, -5 lines 0 comments Download
M crypto/nss_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 chunks +62 lines, -55 lines 0 comments Download
M crypto/nss_util_internal.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +14 lines, -2 lines 0 comments Download
M crypto/rsa_private_key_nss_unittest.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M net/base/keygen_handler_unittest.cc View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
tbarzic
Can you please take a look? https://codereview.chromium.org/317613004/diff/80001/crypto/nss_util.cc File crypto/nss_util.cc (left): https://codereview.chromium.org/317613004/diff/80001/crypto/nss_util.cc#oldcode613 crypto/nss_util.cc:613: PK11SlotInfo* GetPublicNSSKeySlot() { ...
6 years, 6 months ago (2014-06-12 01:41:37 UTC) #1
pneubeck (no reviews)
https://codereview.chromium.org/317613004/diff/80001/chromeos/tpm_token_loader.cc File chromeos/tpm_token_loader.cc (right): https://codereview.chromium.org/317613004/diff/80001/chromeos/tpm_token_loader.cc#newcode41 chromeos/tpm_token_loader.cc:41: void CallEnableTPMTokenForNSS() { optional nit: could be removed. I ...
6 years, 6 months ago (2014-06-12 15:14:54 UTC) #2
tbarzic
https://codereview.chromium.org/317613004/diff/80001/chromeos/tpm_token_loader.cc File chromeos/tpm_token_loader.cc (right): https://codereview.chromium.org/317613004/diff/80001/chromeos/tpm_token_loader.cc#newcode41 chromeos/tpm_token_loader.cc:41: void CallEnableTPMTokenForNSS() { On 2014/06/12 15:14:54, pneubeck wrote: > ...
6 years, 6 months ago (2014-06-12 18:38:13 UTC) #3
tbarzic
https://codereview.chromium.org/317613004/diff/80001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/317613004/diff/80001/crypto/nss_util.cc#newcode453 crypto/nss_util.cc:453: DVLOG(2) << "Using the test slot for the user's ...
6 years, 6 months ago (2014-06-12 18:41:50 UTC) #4
Ryan Sleevi
https://codereview.chromium.org/317613004/diff/80001/crypto/nss_util.cc File crypto/nss_util.cc (left): https://codereview.chromium.org/317613004/diff/80001/crypto/nss_util.cc#oldcode613 crypto/nss_util.cc:613: PK11SlotInfo* GetPublicNSSKeySlot() { On 2014/06/12 18:38:12, tbarzic wrote: > ...
6 years, 6 months ago (2014-06-12 18:44:04 UTC) #5
pneubeck (no reviews)
https://codereview.chromium.org/317613004/diff/80001/crypto/nss_util.cc File crypto/nss_util.cc (left): https://codereview.chromium.org/317613004/diff/80001/crypto/nss_util.cc#oldcode613 crypto/nss_util.cc:613: PK11SlotInfo* GetPublicNSSKeySlot() { On 2014/06/12 18:44:04, Ryan Sleevi wrote: ...
6 years, 6 months ago (2014-06-12 18:48:30 UTC) #6
pneubeck (no reviews)
On 2014/06/12 18:38:13, tbarzic wrote: > https://codereview.chromium.org/317613004/diff/80001/chromeos/tpm_token_loader.cc > File chromeos/tpm_token_loader.cc (right): > > https://codereview.chromium.org/317613004/diff/80001/chromeos/tpm_token_loader.cc#newcode41 > ...
6 years, 6 months ago (2014-06-13 19:34:06 UTC) #7
mattm
https://codereview.chromium.org/317613004/diff/100001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/317613004/diff/100001/crypto/nss_util.cc#newcode454 crypto/nss_util.cc:454: public_slot.reset(PK11_ReferenceSlot(test_slot_)); this isn't necessary (GetPublicSlotForChromeOSUser already returns the test_slot ...
6 years, 6 months ago (2014-06-13 22:04:59 UTC) #8
tbarzic
https://codereview.chromium.org/317613004/diff/100001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/317613004/diff/100001/crypto/nss_util.cc#newcode454 crypto/nss_util.cc:454: public_slot.reset(PK11_ReferenceSlot(test_slot_)); On 2014/06/13 22:04:59, mattm wrote: > this isn't ...
6 years, 6 months ago (2014-06-13 22:37:25 UTC) #9
Ryan Sleevi
I'll leave Matt to stamp this - he knows this code better than I. My ...
6 years, 6 months ago (2014-06-19 00:35:49 UTC) #10
mattm
oops, lgtm.
6 years, 6 months ago (2014-06-19 00:57:15 UTC) #11
pneubeck (no reviews)
can this be committed?
6 years, 6 months ago (2014-06-26 09:59:56 UTC) #12
pneubeck (no reviews)
On 2014/06/26 09:59:56, pneubeck wrote: > can this be committed? sorry to bother you, but ...
6 years, 5 months ago (2014-06-30 12:18:44 UTC) #13
stevenjb
lgtm
6 years, 5 months ago (2014-06-30 18:29:03 UTC) #14
tbarzic
rsleevi, stevenjb: I need OWNER approvals from you for crypto/ and chromeos/ adding rlp for ...
6 years, 5 months ago (2014-06-30 18:30:13 UTC) #15
Ryan Sleevi
How is the device owner determined now (the key lives in the owners NSS DB, ...
6 years, 5 months ago (2014-06-30 18:40:44 UTC) #16
tbarzic
On 2014/06/30 18:40:44, Ryan Sleevi wrote: > How is the device owner determined now (the ...
6 years, 5 months ago (2014-06-30 22:08:06 UTC) #17
tbarzic
On 2014/06/30 22:08:06, tbarzic wrote: > On 2014/06/30 18:40:44, Ryan Sleevi wrote: > > How ...
6 years, 5 months ago (2014-06-30 22:13:24 UTC) #18
rpetterson
profiles LGTM (it sounds like things might change a bit. just let me know if ...
6 years, 5 months ago (2014-06-30 22:26:24 UTC) #19
pneubeck (no reviews)
https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator.cc File chrome/browser/chromeos/login/auth/parallel_authenticator.cc (right): https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator.cc#newcode511 chrome/browser/chromeos/login/auth/parallel_authenticator.cc:511: if (LoginState::IsInitialized()) { When you added this, you wrote ...
6 years, 5 months ago (2014-07-01 14:37:18 UTC) #20
tbarzic
https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator.cc File chrome/browser/chromeos/login/auth/parallel_authenticator.cc (right): https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator.cc#newcode511 chrome/browser/chromeos/login/auth/parallel_authenticator.cc:511: if (LoginState::IsInitialized()) { On 2014/07/01 14:37:17, pneubeck wrote: > ...
6 years, 5 months ago (2014-07-01 16:33:07 UTC) #21
Ryan Sleevi
https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator_unittest.cc File chrome/browser/chromeos/login/auth/parallel_authenticator_unittest.cc (right): https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator_unittest.cc#newcode97 chrome/browser/chromeos/login/auth/parallel_authenticator_unittest.cc:97: state_.reset(new TestAttemptState(user_context_, false)); Random aside; Why is this all ...
6 years, 5 months ago (2014-07-01 18:51:33 UTC) #22
tbarzic
https://codereview.chromium.org/317613004/diff/200001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/317613004/diff/200001/crypto/nss_util.cc#newcode465 crypto/nss_util.cc:465: } On 2014/07/01 18:51:33, Ryan Sleevi wrote: > This ...
6 years, 5 months ago (2014-07-01 19:25:39 UTC) #23
tbarzic
PTAL, I think the approach in the new patchset is a bit cleaner.. adding ygorshenin ...
6 years, 5 months ago (2014-07-01 23:55:04 UTC) #24
mattm
https://codereview.chromium.org/317613004/diff/240001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/317613004/diff/240001/crypto/nss_util.cc#newcode476 crypto/nss_util.cc:476: bool RequestInitializeTPMForChromeOSUser( New approach seems good. Not entirely sure ...
6 years, 5 months ago (2014-07-02 22:31:40 UTC) #25
tbarzic
https://codereview.chromium.org/317613004/diff/240001/crypto/nss_util.cc File crypto/nss_util.cc (right): https://codereview.chromium.org/317613004/diff/240001/crypto/nss_util.cc#newcode476 crypto/nss_util.cc:476: bool RequestInitializeTPMForChromeOSUser( On 2014/07/02 22:31:39, mattm wrote: > New ...
6 years, 5 months ago (2014-07-02 22:50:23 UTC) #26
stevenjb
This is largely out of my depth, but I don't see any red flags, just ...
6 years, 5 months ago (2014-07-02 23:06:03 UTC) #27
ygorshenin1
chrome/browser/chromeos/ownership/* lgtm.
6 years, 5 months ago (2014-07-07 11:10:05 UTC) #28
tbarzic
https://codereview.chromium.org/317613004/diff/240001/chrome/browser/chromeos/ownership/owner_settings_service.cc File chrome/browser/chromeos/ownership/owner_settings_service.cc (right): https://codereview.chromium.org/317613004/diff/240001/chrome/browser/chromeos/ownership/owner_settings_service.cc#newcode119 chrome/browser/chromeos/ownership/owner_settings_service.cc:119: void IsPrivateKeyExistAsync( On 2014/07/02 23:06:02, stevenjb wrote: > nit: ...
6 years, 5 months ago (2014-07-08 17:47:18 UTC) #29
pneubeck (no reviews)
https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator.cc File chrome/browser/chromeos/login/auth/parallel_authenticator.cc (right): https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator.cc#newcode511 chrome/browser/chromeos/login/auth/parallel_authenticator.cc:511: if (LoginState::IsInitialized()) { On 2014/07/01 16:33:07, tbarzic wrote: > ...
6 years, 5 months ago (2014-07-09 16:08:11 UTC) #30
Ryan Sleevi
Sorry for the delays. I'm still having a bit of trouble wrapping my head around ...
6 years, 5 months ago (2014-07-09 19:05:41 UTC) #31
tbarzic
https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator.cc File chrome/browser/chromeos/login/auth/parallel_authenticator.cc (right): https://codereview.chromium.org/317613004/diff/200001/chrome/browser/chromeos/login/auth/parallel_authenticator.cc#newcode511 chrome/browser/chromeos/login/auth/parallel_authenticator.cc:511: if (LoginState::IsInitialized()) { On 2014/07/09 16:08:11, pneubeck wrote: > ...
6 years, 5 months ago (2014-07-09 20:45:34 UTC) #32
pneubeck (no reviews)
I think this now only needs a last lgtm from Ryan :-)
6 years, 5 months ago (2014-07-11 05:30:57 UTC) #33
Ryan Sleevi
lgtm
6 years, 5 months ago (2014-07-11 05:36:49 UTC) #34
tbarzic
The CQ bit was checked by tbarzic@chromium.org
6 years, 5 months ago (2014-07-12 02:35:28 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tbarzic@chromium.org/317613004/320001
6 years, 5 months ago (2014-07-12 02:36:08 UTC) #36
commit-bot: I haz the power
6 years, 5 months ago (2014-07-12 12:46:21 UTC) #37
Message was sent while issue was closed.
Change committed as 282817

Powered by Google App Engine
This is Rietveld 408576698