vtpmmgr: Store hardware TPM Locality

The TPM locality must be specified when using TPM_PCR_INFO_LONG for
TPM_Seal.  Store the locality so it can be provided later.

Signed-off-by: Jason Andryuk <andryuk@aero.org>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
This commit is contained in:
Jason Andryuk authored and Ian Campbell committed 2014-04-23 11:57:53 +01:00
1 parent ffa11862aa
commit d426026701
2 files changed
+5 -1

No files matched your search

+3 -1
View File
@@ -69,7 +69,8 @@ const TPM_AUTHDATA WELLKNOWN_AUTH = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0
struct vtpm_globals vtpm_globals = {
.tpm_fd = -1,
.oiap = { .AuthHandle = 0 }
.oiap = { .AuthHandle = 0 },
.hw_locality = 0
};
static int tpm_entropy_source(void* dummy, unsigned char* data, size_t len, size_t* olen) {
@@ -436,6 +437,7 @@ TPM_RESULT vtpmmgr_init(int argc, char** argv) {
}
vtpm_globals.tpm_fd = tpm_tis_open(tpm);
tpm_tis_request_locality(tpm, opts.tpmlocality);
vtpm_globals.hw_locality = opts.tpmlocality;
}
break;
case TPMDRV_TPMFRONT:
+2
View File
@@ -57,6 +57,8 @@ struct vtpm_globals {
entropy_context entropy;
ctr_drbg_context ctr_drbg;
int hw_locality;
};
struct tpm_opaque {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.