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

Unified Diff: tpm.cc

Issue 3437016: Add better handling of a TPM clear. (Closed) Base URL: http://git.chromium.org/git/tpm_init.git
Patch Set: Remove unnecessary include. Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tpm.h ('k') | tpm_init.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « tpm.h ('k') | tpm_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698