|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] vTPM/TPM2: Bind group keys and sectors data on disk
commit b80533f680b4dbdb6ff8e5ed2ace6cffe79198d1
Author: Quan Xu <quan.xu@xxxxxxxxx>
AuthorDate: Thu Jan 15 04:21:51 2015 -0500
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Jan 28 12:54:50 2015 +0000
vTPM/TPM2: Bind 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_write.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/stubdom/vtpmmgr/disk_write.c b/stubdom/vtpmmgr/disk_write.c
index 4c825c5..ab15a9a 100644
--- a/stubdom/vtpmmgr/disk_write.c
+++ b/stubdom/vtpmmgr/disk_write.c
@@ -88,7 +88,12 @@ static void generate_group_seals(struct mem_group *src,
const struct mem_tpm_mgr
dst->pcr_selection = src->seals[i].pcr_selection;
memcpy(&dst->digest_release, &src->seals[i].digest_release, 20);
TPM_pcr_digest(&dst->digest_at_seal, dst->pcr_selection);
- TPM_disk_seal(dst, &sblob, sizeof(sblob));
+
+ /*TPM 2.0 bind | TPM 1.x seal*/
+ if (hw_is_tpm2())
+ TPM2_disk_bind(dst, &sblob, sizeof(sblob));
+ else
+ TPM_disk_seal(dst, &sblob, sizeof(sblob));
}
src->seal_bits.nr_cfgs = native_be32(src->nr_seals);
@@ -250,7 +255,11 @@ static void disk_write_seal_list(struct mem_tpm_mgr *mgr,
struct mem_group *grou
memcpy(&dst->digest_release, &src->digest_release, 20);
TPM_pcr_digest(&dst->digest_at_seal, dst->pcr_selection);
- TPM_disk_seal(dst, &sblob, sizeof(sblob));
+ /*TPM 2.0 bind / TPM 1.x seal*/
+ if (hw_is_tpm2())
+ TPM2_disk_bind(dst, &sblob, sizeof(sblob));
+ else
+ TPM_disk_seal(dst, &sblob, sizeof(sblob));
}
memcpy(seal->hdr.magic, TPM_MGR_MAGIC, 12);
--
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 |