chromiumos/platform/tpm_init.git
3 years agoFix TpmIsReady regression. 0.10.134.B 0.10.136.B 0.10.138.B 0.10.140.B 0.10.142.B 0.10.144.B 0.10.146.B 0.10.148.B 0.10.150.B 0.10.152.B 0.10.154.B 0.10.156.B 0.11.158.B 0.11.166.B 0.11.208.B 0.11.218.B 0.11.227.B 0.11.241.B 0.11.257.B 0.11.257.B90 0.12.362.B 0.12.369.B 0.9.100.B 0.9.102.B 0.9.104.B 0.9.106.B 0.9.108.B 0.9.110.B 0.9.112.B 0.9.114.B 0.9.116.B 0.9.118.B 0.9.120.B 0.9.122.B 0.9.124.B 0.9.126.B 0.9.128.B 0.9.130.B 0.9.132.B 0.9.80.B 0.9.82.B 0.9.84.B 0.9.86.B 0.9.90.B 0.9.90.T 0.9.92.B 0.9.94.B 0.9.94.T 0.9.96.T 0.9.98.B 11.1.241.B master 0.10.134.0 0.10.136.0 0.10.138.0 0.10.140.0 0.10.142.0 0.10.142.1 0.10.142.2 0.10.142.3 0.10.144.0 0.10.144.1 0.10.146.0 0.10.146.1 0.10.148.0 0.10.150.0 0.10.154.0 0.10.156.0 0.10.156.1 0.10.156.18 0.10.156.2 0.10.156.20 0.10.156.3 0.10.156.30 0.10.156.34 0.10.156.36 0.10.156.4 0.10.156.46 0.10.156.5 0.11.158.0 0.11.181.0 0.9.100.0 0.9.102.0 0.9.102.1 0.9.102.2 0.9.102.3 0.9.102.4 0.9.102.5 0.9.102.6 0.9.104.0 0.9.106.0 0.9.108.0 0.9.110.0 0.9.110.1 0.9.110.10 0.9.110.2 0.9.110.3 0.9.110.4 0.9.110.5 0.9.110.6 0.9.110.7 0.9.110.8 0.9.110.9 0.9.112.0 0.9.112.1 0.9.112.2 0.9.114.0 0.9.116.0 0.9.118.0 0.9.120.0 0.9.122.0 0.9.124.0 0.9.124.1 0.9.126.0 0.9.128.0 0.9.128.1 0.9.128.10 0.9.128.11 0.9.128.12 0.9.128.13 0.9.128.14 0.9.128.2 0.9.128.3 0.9.128.4 0.9.128.5 0.9.128.6 0.9.128.7 0.9.128.8 0.9.128.9 0.9.130.0 0.9.130.10 0.9.130.11 0.9.130.12 0.9.130.13 0.9.130.14 0.9.130.15 0.9.130.2 0.9.130.3 0.9.130.4 0.9.130.5 0.9.130.6 0.9.130.7 0.9.130.8 0.9.130.9 0.9.80.0 0.9.82.0 0.9.84.0 0.9.86.0 0.9.89.1 0.9.90.0 0.9.90.1 0.9.90.2 0.9.90.3 0.9.90.4 0.9.92.0 0.9.94.0 0.9.98.0 0.9.98.1 0.9.98.2 0.9.98.3 0.9.98.4
Frank Swiderski [Mon, 11 Oct 2010 22:52:39 +0000 (15:52 -0700)]
Fix TpmIsReady regression.

To test:
1. Clear the TPM, reboot.  Run cryptohome --action=tpm_status.  It will return not ready until the TPM is owned, at which point it should show the TPM as enabled, owned, and ready.
2. Reboot after owning the TPM, run cryptohome --action=tpm_status.  It should show the TPM as enabled, owned, and ready.
3. Reboot after clearing the TPM in the bios, but not activating it.  It should show the TPM as not enabled, owned, or ready.

Change-Id: I352cc049866fa10c7b902f1de934d99394c904cc

BUG=none
TEST=manual

Review URL: http://codereview.chromium.org/3674006

3 years agoAdds the necessary changes to tpm_init to allow triggered initialization. 0.9.75.B_factory 0.9.76.B 0.9.78.B 0.9.76.0 0.9.76.1 0.9.78.0 0.9.78.1 0.9.78.2
Frank Swiderski [Mon, 4 Oct 2010 22:08:53 +0000 (15:08 -0700)]
Adds the necessary changes to tpm_init to allow triggered initialization.

Change-Id: I757a112ef011ee9688f695cdd89ad2786c47778b

BUG=3065
TEST=

Review URL: http://codereview.chromium.org/3475009

4 years agoOnly check the well-known password if we know it is not owned. 0.9.74.B 0.9.74.0 0.9.74.1 0.9.74.2 0.9.74.3 0.9.74.4 0.9.74.5
Frank Swiderski [Mon, 27 Sep 2010 19:45:18 +0000 (12:45 -0700)]
Only check the well-known password if we know it is not owned.

This fix ensures that we only try the well-known owner password if the TPM is not fully owned by checking for the presence of the .tpm_owned file.  Otherwise, each boot would cause a failed password attempt, which, on some TPMs, can eventually get the TPM into defend lock state.

Change-Id: I87ef8028ed61f20e80e0d65a4e4d84cceea10203

BUG=partner/1137
TEST=manual

Review URL: http://codereview.chromium.org/3384032

4 years agoAdd better handling of a TPM clear.
Frank Swiderski [Thu, 23 Sep 2010 19:14:53 +0000 (12:14 -0700)]
Add better handling of a TPM clear.

This adds a callback so that the user of TpmInit can receive a notification when the TPM initialization finishes.

Change-Id: I719810052e02536d54913950d0b9f053e6e3a01c

BUG=6883
TEST=(see change in cryptohome)

Review URL: http://codereview.chromium.org/3437016

4 years agoAdd additional status APIs for the TPM. 0.8.70.B 0.8.70.0 0.8.70.1 0.8.70.2 0.8.70.3 0.8.70.4 0.8.70.5 0.8.70.6 0.8.70.7 0.8.70.8 0.8.72.0 0.8.72.1 0.8.72.2 0.8.72.3
Frank Swiderski [Wed, 1 Sep 2010 22:40:38 +0000 (15:40 -0700)]
Add additional status APIs for the TPM.

Adds more status APIs and diagnostics to get the TPM state.

Change-Id: I4edbbbe66b9ab2f8f7c0694d14d9b4c87989d4b5

BUG=none
TEST=cryptohome command line program

Review URL: http://codereview.chromium.org/3236009

4 years agoAdd method to get random bytes from the TPM. 0.8.68.B 0.8.71.B_factory 0.8.68.0 0.8.68.1 0.8.68.2 0.8.68.4 0.8.68.5
Frank Swiderski [Wed, 25 Aug 2010 17:24:13 +0000 (10:24 -0700)]
Add method to get random bytes from the TPM.

Change-Id: I66d8a746be5add2d277e2a0783c562206084fcb4

BUG=227
TEST=manual

Review URL: http://codereview.chromium.org/3116014

4 years agoCommit the change that I forgot to commit. 0.8.66.B 0.8.66.0 0.8.66.1 0.8.66.2
Frank Swiderski [Fri, 13 Aug 2010 17:30:05 +0000 (10:30 -0700)]
Commit the change that I forgot to commit.

This change should have gone into the earlier push, but I neglected to commit it.  It merely sets up some local variables, which was the cause of the build failure.

Change-Id: I91e39c8f0101ff8693fd4805423fbbf8fedf7a0f

BUG=none
TEST=build

Review URL: http://codereview.chromium.org/3135016

4 years agoUpdate TPM initialization to better handle errors.
Frank Swiderski [Fri, 13 Aug 2010 16:26:31 +0000 (09:26 -0700)]
Update TPM initialization to better handle errors.

This change modifies slightly the TPM initialization, changing it to use a well-known owner password until the last step, when it changes the owner password to a random string.  This way, if ownership is interrupted, it has a better chance of being able to resume or being diagnosed.

This change allows use of the TPM emulator by adding detection of whether or not the emulator is owned, as well as checking if the SRK needs the owner password before trying to unrestrict it (the unrestrict code path fails on the TPM emulator but not on hardware TPMs--I do not know why, but the tpm_restrictsrk utility also does not work on the emulator).

Change-Id: I4957205bb72b6d1a5009ca3372db6aefd58db3d9

BUG=5561
TEST=manual

Review URL: http://codereview.chromium.org/3118014

4 years agoDon't init the TPM if /sys/class/misc/tpm0 doesn't exist.
Frank Swiderski [Tue, 10 Aug 2010 22:21:30 +0000 (15:21 -0700)]
Don't init the TPM if /sys/class/misc/tpm0 doesn't exist.

This is a workaround for problems with the TPM emulator.  If we need the TPM emulator to be initialized, we'll need to patch it or find another method of deciding whether to attempt ownership.

BUG=NONE
TEST=manual

Review URL: http://codereview.chromium.org/3121004

4 years agoAdd LICENSE file 0.8.64.B 0.8.64.0
J. Richard Barnette [Thu, 5 Aug 2010 21:13:48 +0000 (14:13 -0700)]
Add LICENSE file

4 years agoInitial version of tpm_init, a library for taking ownership of the TPM.
Frank Swiderski [Mon, 2 Aug 2010 23:01:52 +0000 (16:01 -0700)]
Initial version of tpm_init, a library for taking ownership of the TPM.

BUG=3065,4657
TEST=manual

Review URL: http://codereview.chromium.org/3048029

4 years agoInitialize repository.
Frank Swiderski [Mon, 26 Jul 2010 21:20:44 +0000 (14:20 -0700)]
Initialize repository.