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

Issue 9969019: Forces TPM slot to be "Friendly", allowing NSS to avoid locking (Closed)

Created:
8 years, 8 months ago by Greg Spencer (Chromium)
Modified:
8 years, 8 months ago
Reviewers:
wtc, oshima, Ryan Sleevi
CC:
chromium-reviews, wtc
Visibility:
Public.

Description

Forces TPM slot to be "Friendly", allowing NSS to avoid locking Also added VLOG(1) logging for PKCS11 slot info. BUG=chromium:118206 TEST=Ran on device, tried to repro bug, and was unable to. Confirmed that friendly bit was set (based on log output). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=130474

Patch Set 1 #

Total comments: 3

Patch Set 2 : Adding code to force setting friendly bit for hardware slots #

Patch Set 3 : moving to vlog #

Total comments: 1

Patch Set 4 : Returning to a space instead of a comma #

Patch Set 5 : Reverting options changes #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -3 lines) Patch
M crypto/nss_util.cc View 1 2 3 4 3 chunks +48 lines, -3 lines 7 comments Download

Messages

Total messages: 30 (0 generated)
Greg Spencer (Chromium)
8 years, 8 months ago (2012-03-30 17:42:10 UTC) #1
Ryan Sleevi
https://chromiumcodereview.appspot.com/9969019/diff/1/crypto/nss_util.cc File crypto/nss_util.cc (right): https://chromiumcodereview.appspot.com/9969019/diff/1/crypto/nss_util.cc#newcode570 crypto/nss_util.cc:570: "trustOrder=100 slotParams=(1={slotFlags=[RSA,PublicCerts] " I believe you should update the ...
8 years, 8 months ago (2012-03-30 18:29:26 UTC) #2
Ryan Sleevi
http://codereview.chromium.org/9969019/diff/1/crypto/nss_util.cc File crypto/nss_util.cc (right): http://codereview.chromium.org/9969019/diff/1/crypto/nss_util.cc#newcode571 crypto/nss_util.cc:571: "askpw=only})"); One more thing to try here: This will ...
8 years, 8 months ago (2012-03-30 21:05:47 UTC) #3
Ryan Sleevi
http://codereview.chromium.org/9969019/diff/1/crypto/nss_util.cc File crypto/nss_util.cc (right): http://codereview.chromium.org/9969019/diff/1/crypto/nss_util.cc#newcode571 crypto/nss_util.cc:571: "askpw=only})"); On 2012/03/30 21:05:48, Ryan Sleevi wrote: > for ...
8 years, 8 months ago (2012-03-30 21:07:13 UTC) #4
Greg Spencer (Chromium)
On 2012/03/30 21:07:13, Ryan Sleevi wrote: > http://codereview.chromium.org/9969019/diff/1/crypto/nss_util.cc > File crypto/nss_util.cc (right): > > http://codereview.chromium.org/9969019/diff/1/crypto/nss_util.cc#newcode571 ...
8 years, 8 months ago (2012-03-31 00:09:15 UTC) #5
oshima
great, can you upload new patch? I'll try it on monday. - oshima On Fri, ...
8 years, 8 months ago (2012-03-31 05:07:08 UTC) #6
Greg Spencer (Chromium)
On 2012/03/31 05:07:08, oshima wrote: > great, can you upload new patch? I'll try it ...
8 years, 8 months ago (2012-04-02 14:24:51 UTC) #7
Greg Spencer (Chromium)
OK, this should be ready to submit for a fix. I've updated the original patch ...
8 years, 8 months ago (2012-04-02 21:45:39 UTC) #8
oshima
On 2012/04/02 21:45:39, Greg Spencer (Chromium) wrote: > OK, this should be ready to submit ...
8 years, 8 months ago (2012-04-02 21:50:30 UTC) #9
Greg Spencer (Chromium)
On 2012/04/02 21:50:30, oshima wrote: > sure, testing it now. How'd it go? I'd like ...
8 years, 8 months ago (2012-04-02 23:22:56 UTC) #10
oshima
LGTM Sorry I had local build issue and had to rebuild a few times. On ...
8 years, 8 months ago (2012-04-02 23:47:27 UTC) #11
wtc
Review comments on patch set 3: I only reviewed the NSS PKCS #11 module spec ...
8 years, 8 months ago (2012-04-03 00:25:49 UTC) #12
Greg Spencer (Chromium)
On 2012/04/03 00:25:49, wtc wrote: > So we should use a space instead of a ...
8 years, 8 months ago (2012-04-03 00:28:50 UTC) #13
Greg Spencer (Chromium)
On 2012/04/03 00:28:50, Greg Spencer (Chromium) wrote: > On 2012/04/03 00:25:49, wtc wrote: > > ...
8 years, 8 months ago (2012-04-03 00:30:11 UTC) #14
Greg Spencer (Chromium)
rsleevi and/or wtc, can one of you give an OWNERS review for this CL so ...
8 years, 8 months ago (2012-04-03 02:21:13 UTC) #15
Ryan Sleevi
Two nits: - I'd be inclined to say revert the options string, just to be ...
8 years, 8 months ago (2012-04-03 02:33:28 UTC) #16
Greg Spencer (Chromium)
On 2012/04/03 02:33:28, Ryan Sleevi wrote: > - I'd be inclined to say revert the ...
8 years, 8 months ago (2012-04-03 02:49:48 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gspencer@chromium.org/9969019/8
8 years, 8 months ago (2012-04-03 17:13:43 UTC) #18
commit-bot: I haz the power
Try job failure for 9969019-8 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 8 months ago (2012-04-03 18:03:43 UTC) #19
wtc
Patch set 5 LGTM. Thanks! http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc File crypto/nss_util.cc (right): http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc#newcode576 crypto/nss_util.cc:576: PK11DefaultArrayEntry* entries = PK11_GetDefaultArray(&size); ...
8 years, 8 months ago (2012-04-03 19:27:26 UTC) #20
wtc
Patch set 5 LGTM. gspencer: I have a question for you. http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc File crypto/nss_util.cc (right): ...
8 years, 8 months ago (2012-04-03 19:56:55 UTC) #21
Greg Spencer (Chromium)
On 2012/04/03 19:56:55, wtc wrote: > Did you open a new bug report for this ...
8 years, 8 months ago (2012-04-03 20:46:35 UTC) #22
wtc
http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc File crypto/nss_util.cc (right): http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc#newcode572 crypto/nss_util.cc:572: "trustOrder=100 slotParams=(1={slotFlags=[RSA] askpw=only})"); On 2012/04/03 19:56:55, wtc wrote: > ...
8 years, 8 months ago (2012-04-03 20:47:27 UTC) #23
Ryan Sleevi
I believe I've identified the root cause, see below. Subtlety, thy name is NSS http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc ...
8 years, 8 months ago (2012-04-03 21:57:14 UTC) #24
wtc
http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc File crypto/nss_util.cc (right): http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc#newcode572 crypto/nss_util.cc:572: "trustOrder=100 slotParams=(1={slotFlags=[RSA] askpw=only})"); rsleevi: good job! Thank you for ...
8 years, 8 months ago (2012-04-03 22:17:24 UTC) #25
Greg Spencer (Chromium)
Great! It seems pretty non-intuitive to need to have this, but hey, if it works... ...
8 years, 8 months ago (2012-04-03 22:21:50 UTC) #26
Ryan Sleevi
On 2012/04/03 22:21:50, Greg Spencer (Chromium) wrote: > Great! It seems pretty non-intuitive to need ...
8 years, 8 months ago (2012-04-03 22:28:36 UTC) #27
Greg Spencer (Chromium)
On Tue, Apr 3, 2012 at 3:28 PM, <rsleevi@chromium.org> wrote: > > I suppose it ...
8 years, 8 months ago (2012-04-03 22:36:44 UTC) #28
Greg Spencer (Chromium)
On 2012/04/03 22:36:44, Greg Spencer (Chromium) wrote: > On Tue, Apr 3, 2012 at 3:28 ...
8 years, 8 months ago (2012-04-03 22:38:33 UTC) #29
wtc
8 years, 8 months ago (2012-04-03 23:00:58 UTC) #30
I recommend using only slotFlags=[PublicCerts] askpw=only
(formatted properly).  I explain why trustOrder=100 and
slotFlags=RSA should be removed below.

http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc
File crypto/nss_util.cc (right):

http://codereview.chromium.org/9969019/diff/8/crypto/nss_util.cc#newcode568
crypto/nss_util.cc:568: //   trusted slot for the mechanisms it provides.

This comment is incorrect.  'trustOrder' is defined as:
  trustOrder - integer value specifying the order in
  which the trust information for certificates specified
  by tokens on this PKCS #11 library should be rolled up.
  '0' means that tokens on this library should not supply
  trust information (default). The relative order of two
  pkcs#11 libraries which have the same trustOrder value
  is undefined.

I doubt the CHAPS module provides certificate trust
information, so I recommend removing trustOrder=100.

I suspect what you intended may be cipherOrder.  In
any case, I recommend not specifying cipherOrder unless
we know it's necessary.

slotFlags=RSA means "This token should be used for all RSA
operations (other than Private key operations where the key
lives in another token)".  This doesn't seem appropriate for
the CHAPS module.

Powered by Google App Engine
This is Rietveld 408576698