diff options
author | Tadeusz Struk <tadeusz.struk@intel.com> | 2019-06-27 17:17:21 -0700 |
---|---|---|
committer | Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de> | 2019-07-10 11:38:04 +0200 |
commit | b55b642fc48b5a5cdbbf21e46397e5c8c2ecafcb (patch) | |
tree | 53ad3411456898b521a759820c412be14653e7be | |
parent | 51dd30d413b51e180009646d5273551da9b8ab56 (diff) | |
download | tpm2-tss-b55b642fc48b5a5cdbbf21e46397e5c8c2ecafcb.tar.gz |
sys: Add missing definition of TPMS_TAGGED_POLICY struc
For whatever reson we don't have the definition of the
TPMS_TAGGED_POLICY struct even though its size is used
to calculate the TPM2_MAX_TAGGED_POLICIES value.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
-rw-r--r-- | include/tss2/tss2_mu.h | 14 | ||||
-rw-r--r-- | include/tss2/tss2_tpm2_types.h | 6 | ||||
-rw-r--r-- | lib/tss2-mu.def | 2 | ||||
-rw-r--r-- | lib/tss2-mu.map | 2 | ||||
-rw-r--r-- | src/tss2-mu/tpms-types.c | 8 |
5 files changed, 32 insertions, 0 deletions
diff --git a/include/tss2/tss2_mu.h b/include/tss2/tss2_mu.h index a9c25e19..7adec599 100644 --- a/include/tss2/tss2_mu.h +++ b/include/tss2/tss2_mu.h @@ -791,6 +791,20 @@ Tss2_MU_TPMS_TAGGED_PROPERTY_Unmarshal( TPMS_TAGGED_PROPERTY *dest); TSS2_RC +Tss2_MU_TPMS_TAGGED_POLICY_Marshal( + TPMS_TAGGED_POLICY const *src, + uint8_t buffer[], + size_t buffer_size, + size_t *offset); + +TSS2_RC +Tss2_MU_TPMS_TAGGED_POLICY_Unmarshal( + uint8_t const buffer[], + size_t buffer_size, + size_t *offset, + TPMS_TAGGED_POLICY *dest); + +TSS2_RC Tss2_MU_TPMS_CLOCK_INFO_Marshal( TPMS_CLOCK_INFO const *src, uint8_t buffer[], diff --git a/include/tss2/tss2_tpm2_types.h b/include/tss2/tss2_tpm2_types.h index c1e79878..51550530 100644 --- a/include/tss2/tss2_tpm2_types.h +++ b/include/tss2/tss2_tpm2_types.h @@ -999,6 +999,12 @@ typedef struct { BYTE pcrSelect[TPM2_PCR_SELECT_MAX]; /* the bit map of PCR with the identified property */ } TPMS_TAGGED_PCR_SELECT; +/* Definition of TPMS_TAGGED_POLICY Structure */ +typedef struct { + TPM2_HANDLE handle; + TPMT_HA policyHash; +} TPMS_TAGGED_POLICY; + /* Definition of TPML_CC Structure */ typedef struct { UINT32 count; /* number of commands in the commandCode list may be 0 */ diff --git a/lib/tss2-mu.def b/lib/tss2-mu.def index f0581e27..36f4ba37 100644 --- a/lib/tss2-mu.def +++ b/lib/tss2-mu.def @@ -110,6 +110,8 @@ EXPORTS Tss2_MU_TPMS_ALGORITHM_DESCRIPTION_Unmarshal Tss2_MU_TPMS_TAGGED_PROPERTY_Marshal Tss2_MU_TPMS_TAGGED_PROPERTY_Unmarshal + Tss2_MU_TPMS_TAGGED_POLICY_Marshal + Tss2_MU_TPMS_TAGGED_POLICY_Unmarshal Tss2_MU_TPMS_CLOCK_INFO_Marshal Tss2_MU_TPMS_CLOCK_INFO_Unmarshal Tss2_MU_TPMS_TIME_ATTEST_INFO_Marshal diff --git a/lib/tss2-mu.map b/lib/tss2-mu.map index 69a3d3e8..8ac754ed 100644 --- a/lib/tss2-mu.map +++ b/lib/tss2-mu.map @@ -110,6 +110,8 @@ Tss2_MU_TPMS_ALGORITHM_DESCRIPTION_Unmarshal; Tss2_MU_TPMS_TAGGED_PROPERTY_Marshal; Tss2_MU_TPMS_TAGGED_PROPERTY_Unmarshal; + Tss2_MU_TPMS_TAGGED_POLICY_Marshal; + Tss2_MU_TPMS_TAGGED_POLICY_Unmarshal; Tss2_MU_TPMS_CLOCK_INFO_Marshal; Tss2_MU_TPMS_CLOCK_INFO_Unmarshal; Tss2_MU_TPMS_TIME_ATTEST_INFO_Marshal; diff --git a/src/tss2-mu/tpms-types.c b/src/tss2-mu/tpms-types.c index 755e3d85..cd90dab7 100644 --- a/src/tss2-mu/tpms-types.c +++ b/src/tss2-mu/tpms-types.c @@ -976,6 +976,14 @@ TPMS_UNMARSHAL_2(TPMS_TAGGED_PROPERTY, property, Tss2_MU_UINT32_Unmarshal, value, Tss2_MU_UINT32_Unmarshal) +TPMS_MARSHAL_2(TPMS_TAGGED_POLICY, + handle, VAL, Tss2_MU_UINT32_Marshal, + policyHash, ADDR, Tss2_MU_TPMT_HA_Marshal) + +TPMS_UNMARSHAL_2(TPMS_TAGGED_POLICY, + handle, Tss2_MU_UINT32_Unmarshal, + policyHash, Tss2_MU_TPMT_HA_Unmarshal) + TPMS_MARSHAL_4(TPMS_CLOCK_INFO, clock, VAL, Tss2_MU_UINT64_Marshal, resetCount, VAL, Tss2_MU_UINT32_Marshal, |