summaryrefslogtreecommitdiff
path: root/firmware/lib/tpm_lite
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-01-28 16:23:48 -0800
committerChromeBot <chrome-bot@google.com>2013-01-31 09:38:27 -0800
commitc3d488d155961d2849dfdaa4f0461df1aa95c2ca (patch)
tree0f1156cacabea2cf14c418498c4b0197fc4210e4 /firmware/lib/tpm_lite
parent0bf6405a4b4ac1ce569363a45812767777e0f4eb (diff)
downloadvboot-c3d488d155961d2849dfdaa4f0461df1aa95c2ca.tar.gz
Add tlcl tests
Verifies the right TPM commands are called, but doesn't check at a detailed level that they're packed properly. BUG=chromium-os:38139 BRANCH=none TEST=make runtests Change-Id: I6c14db083ac0a40d4738582d200d9687cddb99de Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42261 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'firmware/lib/tpm_lite')
-rw-r--r--firmware/lib/tpm_lite/tlcl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/lib/tpm_lite/tlcl.c b/firmware/lib/tpm_lite/tlcl.c
index ce5614e1..7acca9a1 100644
--- a/firmware/lib/tpm_lite/tlcl.c
+++ b/firmware/lib/tpm_lite/tlcl.c
@@ -21,6 +21,11 @@
#include "utility.h"
#include "vboot_api.h"
+#ifdef FOR_TEST
+/* Allow unit testing implementation of TlclSendReceive() */
+#undef CHROMEOS_ENVIRONMENT
+#endif
+
/* Sets the size field of a TPM command. */
static INLINE void SetTpmCommandSize(uint8_t* buffer, uint32_t size) {
ToTpmUint32(buffer + sizeof(uint16_t), size);