Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Unified Diff: src/platform/tpm_lite/src/tlcl/generator.c

Issue 870004: Many upgrades to tpm_lite. (Closed)
Patch Set: Fix makefile comment. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/tpm_lite/src/tlcl/Makefile ('k') | src/platform/tpm_lite/src/tlcl/tlcl.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/tpm_lite/src/tlcl/generator.c
diff --git a/src/platform/tpm_lite/src/tlcl/generator.c b/src/platform/tpm_lite/src/tlcl/generator.c
index 1906d5f66439d372c3d2ec43a8b5a6f75c99fa57..f3762f48ab961e28f1bf5989af897fb7e4a6c8e0 100644
--- a/src/platform/tpm_lite/src/tlcl/generator.c
+++ b/src/platform/tpm_lite/src/tlcl/generator.c
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <tss/tcs.h>
+#include "tlcl.h"
#include "tlcl_internal.h"
#include "tpmextras.h"
@@ -196,6 +197,13 @@ Command* BuildSelftestfullCommand(void) {
return cmd;
}
+Command* BuildReadPubekCommand(void) {
+ int size = kTpmRequestHeaderLength + sizeof(TPM_NONCE);
+ Command* cmd = newCommand(TPM_ORD_ReadPubek, size);
+ cmd->name = "tpm_readpubek_cmd";
+ return cmd;
+}
+
/* Output the fields of a structure.
*/
void OutputFields(Field* fld) {
@@ -298,6 +306,7 @@ Command* (*builders[])(void) = {
BuildPhysicalPresenceCommand,
BuildStartupCommand,
BuildSelftestfullCommand,
+ BuildReadPubekCommand,
};
static void FreeFields(Field* fld) {
@@ -312,6 +321,7 @@ static void FreeCommands(Command* cmd) {
if (cmd != NULL) {
Command* next_command = cmd->next;
free(cmd);
+ FreeFields(cmd->fields);
FreeCommands(next_command);
}
}
@@ -327,7 +337,7 @@ int main(void) {
printf("/* This file is automatically generated */\n\n");
OutputCommands(commands);
- printf("const int kWriteInfoLength = %ld;\n", sizeof(TPM_WRITE_INFO));
+ printf("const int kWriteInfoLength = %d;\n", (int) sizeof(TPM_WRITE_INFO));
FreeCommands(commands);
return 0;
« no previous file with comments | « src/platform/tpm_lite/src/tlcl/Makefile ('k') | src/platform/tpm_lite/src/tlcl/tlcl.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698