summaryrefslogtreecommitdiff
path: root/firmware/lib/tpm_lite/mocked_tlcl.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/tpm_lite/mocked_tlcl.c')
-rw-r--r--firmware/lib/tpm_lite/mocked_tlcl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/lib/tpm_lite/mocked_tlcl.c b/firmware/lib/tpm_lite/mocked_tlcl.c
index 2657cb63..627ed667 100644
--- a/firmware/lib/tpm_lite/mocked_tlcl.c
+++ b/firmware/lib/tpm_lite/mocked_tlcl.c
@@ -153,3 +153,16 @@ uint32_t TlclGetRandom(uint8_t* data, uint32_t length, uint32_t *size) {
Memset(data, '\x9', *size);
return TPM_SUCCESS;
}
+
+int TlclPacketSize(const uint8_t* packet)
+{
+ uint32_t size;
+ FromTpmUint32(packet + sizeof(uint16_t), &size);
+ return (int) size;
+}
+
+uint32_t TlclSendReceive(const uint8_t* request, uint8_t* response,
+ int max_length)
+{
+ return TPM_SUCCESS;
+}