[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] vTPM/TPM2: Unind group keys and sectors data on disk
commit b1fee946d3f34aaef4e7a0cff445c4d941ffa955 Author: Quan Xu <quan.xu@xxxxxxxxx> AuthorDate: Thu Jan 15 04:21:52 2015 -0500 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Jan 28 12:54:50 2015 +0000 vTPM/TPM2: Unind group keys and sectors data on disk Signed-off-by: Quan Xu <quan.xu@xxxxxxxxx> Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> --- stubdom/vtpmmgr/disk_read.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/stubdom/vtpmmgr/disk_read.c b/stubdom/vtpmmgr/disk_read.c index 33aacdd..e9dc20f 100644 --- a/stubdom/vtpmmgr/disk_read.c +++ b/stubdom/vtpmmgr/disk_read.c @@ -67,6 +67,7 @@ static int find_group_key(struct mem_group *dst, const struct mem_tpm_mgr *parent) { int i, rc, rv = 1; + unsigned int olen; struct hash160 buf; struct disk_group_sealed_data sealed; @@ -88,7 +89,13 @@ static int find_group_key(struct mem_group *dst, TPM_pcr_digest(&buf, cfg->pcr_selection); if (memcmp(&buf, &cfg->digest_release, 20)) continue; - rc = TPM_disk_unseal(&sealed, sizeof(sealed), cfg); + + /*TPM 2.0 unbind | TPM 1.x unseal*/ + if (hw_is_tpm2()) + rc = TPM2_disk_unbind(&sealed, &olen, cfg); + else + rc = TPM_disk_unseal(&sealed, sizeof(sealed), cfg); + if (rc) continue; if (memcmp(&sealed.magic, DISK_GROUP_BOUND_MAGIC, 4)) @@ -112,9 +119,15 @@ static int find_group_key(struct mem_group *dst, static int parse_root_key(struct mem_tpm_mgr *dst, struct disk_seal_entry *src) { int rc; + unsigned int olen; struct disk_root_sealed_data sealed; - rc = TPM_disk_unseal(&sealed, sizeof(sealed), src); + /*TPM 2.0 unbind | TPM 1.x unseal*/ + if (hw_is_tpm2()) + rc = TPM2_disk_unbind(&sealed, &olen, src); + else + rc = TPM_disk_unseal(&sealed, sizeof(sealed), src); + if (rc) return rc; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |