aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2018-02-28 14:34:51 -0800
committerAndreas Fuchs <andreas.fuchs@sit.fraunhofer.de>2018-03-01 03:54:37 +0100
commitf677291124d355e983757ebc16e4208f7f713c78 (patch)
tree412fed5e3214ce3a0eedf16bf2914e6ddee755cc /include
parent5e7991e85ed6cbe47eeb69fc39fbff25af258fd0 (diff)
downloadtpm2-tss-f677291124d355e983757ebc16e4208f7f713c78.tar.gz
marshal: add support for TPMU_NAME type
TPMU_NAME type is a special case of the TPMU_ types, which doesn't have a explicit selector. The value of the size is used instead as a selector as specified in the TCG spec, part2, 10.5.3 section: "The type of Name in the structure is determined by context and the size parameter. If size is four, then the Name is a handle. If size is zero, then no Name is present. Otherwise, the size shall be the size of a TPM_ALG_ID plus the size of the digest produced by the indicated hash algorithm." Fixes: #720 Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/sapi/tss2_mu.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sapi/tss2_mu.h b/include/sapi/tss2_mu.h
index f3400e9e..d41685af 100644
--- a/include/sapi/tss2_mu.h
+++ b/include/sapi/tss2_mu.h
@@ -1634,6 +1634,22 @@ Tss2_MU_TPMU_PUBLIC_ID_Unmarshal(
TPMU_PUBLIC_ID *dest);
TSS2_RC
+Tss2_MU_TPMU_NAME_Marshal(
+ TPMU_NAME const *src,
+ uint32_t selector_value,
+ uint8_t buffer[],
+ size_t buffer_size,
+ size_t *offset);
+
+TSS2_RC
+Tss2_MU_TPMU_NAME_Unmarshal(
+ uint8_t const buffer[],
+ size_t buffer_size,
+ size_t *offset,
+ uint32_t selector_value,
+ TPMU_NAME *dest);
+
+TSS2_RC
Tss2_MU_TPMT_HA_Marshal(
TPMT_HA const *src,
uint8_t buffer[],