| Index: tpm.cc
|
| diff --git a/tpm.cc b/tpm.cc
|
| index 7815309e0ec6ce9afbe7d7b267ca5be6d1486702..6183e7031628f48c022aabddc95789d899586c58 100644
|
| --- a/tpm.cc
|
| +++ b/tpm.cc
|
| @@ -496,7 +496,11 @@ bool Tpm::GetOwnerPassword(chromeos::Blob* owner_password) {
|
| return result;
|
| }
|
|
|
| -bool Tpm::InitializeTpm() {
|
| +bool Tpm::InitializeTpm(bool* OUT_took_ownership) {
|
| + if (OUT_took_ownership) {
|
| + *OUT_took_ownership = false;
|
| + }
|
| +
|
| if (!IsConnected()) {
|
| Connect();
|
| }
|
| @@ -545,6 +549,10 @@ bool Tpm::InitializeTpm() {
|
| took_ownership = true;
|
| }
|
|
|
| + if (OUT_took_ownership) {
|
| + *OUT_took_ownership = took_ownership;
|
| + }
|
| +
|
| // Ensure the SRK is available
|
| TSS_RESULT result;
|
| TSS_HKEY srk_handle;
|
| @@ -592,7 +600,7 @@ bool Tpm::InitializeTpm() {
|
|
|
| is_being_owned_ = false;
|
|
|
| - return took_ownership;
|
| + return true;
|
| }
|
|
|
| bool Tpm::GetRandomData(size_t length, chromeos::Blob* data) {
|
|
|