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

Side by Side Diff: tpm.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tpm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Tpm - class for handling init TPM initialization for Chrome OS 5 // Tpm - class for handling init TPM initialization for Chrome OS
6 6
7 #include <base/lock.h> 7 #include <base/lock.h>
8 #include <base/logging.h> 8 #include <base/logging.h>
9 #include <base/scoped_ptr.h> 9 #include <base/scoped_ptr.h>
10 #include <chromeos/utility.h> 10 #include <chromeos/utility.h>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 bool IsOwned() const { return is_owned_; } 62 bool IsOwned() const { return is_owned_; }
63 63
64 // Returns whether or not the SRK is available 64 // Returns whether or not the SRK is available
65 bool IsSrkAvailable() const { return is_srk_available_; } 65 bool IsSrkAvailable() const { return is_srk_available_; }
66 66
67 // Returns whether or not the TPM is being owned 67 // Returns whether or not the TPM is being owned
68 bool IsBeingOwned() const { return is_being_owned_; } 68 bool IsBeingOwned() const { return is_being_owned_; }
69 69
70 // Runs the TPM initialization sequence. This may take a long time due to the 70 // Runs the TPM initialization sequence. This may take a long time due to the
71 // call to Tspi_TPM_TakeOwnership. 71 // call to Tspi_TPM_TakeOwnership.
72 bool InitializeTpm(); 72 bool InitializeTpm(bool* OUT_took_ownership);
73 73
74 // Gets random bytes from the TPM 74 // Gets random bytes from the TPM
75 // 75 //
76 // Parameters 76 // Parameters
77 // length - The number of bytes to get 77 // length - The number of bytes to get
78 // data (OUT) - The random data from the TPM 78 // data (OUT) - The random data from the TPM
79 bool GetRandomData(size_t length, chromeos::Blob* data); 79 bool GetRandomData(size_t length, chromeos::Blob* data);
80 80
81 private: 81 private:
82 // Attempts to connect to tcsd 82 // Attempts to connect to tcsd
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 // Indicates if the TPM is being owned 217 // Indicates if the TPM is being owned
218 bool is_being_owned_; 218 bool is_being_owned_;
219 219
220 DISALLOW_COPY_AND_ASSIGN(Tpm); 220 DISALLOW_COPY_AND_ASSIGN(Tpm);
221 }; 221 };
222 222
223 } // namespace tpm_init 223 } // namespace tpm_init
224 224
225 #endif // TPM_INIT_TPM_H_ 225 #endif // TPM_INIT_TPM_H_
OLDNEW
« no previous file with comments | « no previous file | tpm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698