[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/7] vtpmmgr: Store hardware TPM Locality
From: Jason Andryuk <andryuk@xxxxxxxx> 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@xxxxxxxx> Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> --- stubdom/vtpmmgr/init.c | 4 +++- stubdom/vtpmmgr/vtpmmgr.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c index 89643e7..c35ab8f 100644 --- a/stubdom/vtpmmgr/init.c +++ b/stubdom/vtpmmgr/init.c @@ -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: diff --git a/stubdom/vtpmmgr/vtpmmgr.h b/stubdom/vtpmmgr/vtpmmgr.h index cf2b962..68edd4c 100644 --- a/stubdom/vtpmmgr/vtpmmgr.h +++ b/stubdom/vtpmmgr/vtpmmgr.h @@ -57,6 +57,8 @@ struct vtpm_globals { entropy_context entropy; ctr_drbg_context ctr_drbg; + + int hw_locality; }; struct tpm_opaque { -- 1.8.5.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |