[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] The attached patch to 1) fix a 64-bit bug with some of the data packing,



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 89030fab2c3fd094f4256b48c370110c19068f5b
# Parent  03d51c0b054609b7c0700d09ffb4ade26f50fbad
The attached patch to 1) fix a 64-bit bug with some of the data packing,
and 2) adds a workaround for an Infineon TPM hardware bug.

Signed-off-by: Vinnie Scarlata, Joseph Cihula (@intel.com)

diff -r 03d51c0b0546 -r 89030fab2c3f tools/vtpm_manager/manager/vtpm_manager.c
--- a/tools/vtpm_manager/manager/vtpm_manager.c Wed Nov  2 10:19:48 2005
+++ b/tools/vtpm_manager/manager/vtpm_manager.c Wed Nov  2 10:21:46 2005
@@ -140,12 +140,15 @@
   TPM_AUTHDATA sharedsecret;
   
   TPMTRYRETURN( VTSP_OSAP(vtpm_globals->manager_tcs_handle,
-                         TPM_ET_SRK,
-                         0, 
+                         TPM_ET_KEYHANDLE,
+                         TPM_SRK_KEYHANDLE, 
                          (const TPM_AUTHDATA*)&vtpm_globals->srk_usage_auth,
                          &sharedsecret, 
                          &osap) ); 
-  
+
+  osap.fContinueAuthSession = FALSE;
+ 
+ 
   TPMTRYRETURN( VTSP_CreateWrapKey( vtpm_globals->manager_tcs_handle,
                                    TPM_KEY_BIND,
                                    (const 
TPM_AUTHDATA*)&vtpm_globals->storage_key_usage_auth,
diff -r 03d51c0b0546 -r 89030fab2c3f tools/vtpm_manager/manager/vtsp.c
--- a/tools/vtpm_manager/manager/vtsp.c Wed Nov  2 10:19:48 2005
+++ b/tools/vtpm_manager/manager/vtsp.c Wed Nov  2 10:21:46 2005
@@ -180,8 +180,8 @@
   Crypto_GetRandom((BYTE *) &nonceOddOSAP, sizeof(TPM_NONCE) ); 
   
   TPMTRYRETURN( TCSP_OSAP(    hContext,
-                             TPM_ET_SRK,
-                             0, 
+                             entityType,
+                             entityValue, 
                              nonceOddOSAP,
                              &auth->AuthHandle, 
                              &auth->NonceEven, 
diff -r 03d51c0b0546 -r 89030fab2c3f tools/vtpm_manager/util/buffer.h
--- a/tools/vtpm_manager/util/buffer.h  Wed Nov  2 10:19:48 2005
+++ b/tools/vtpm_manager/util/buffer.h  Wed Nov  2 10:21:46 2005
@@ -36,18 +36,6 @@
 
 #include <stddef.h>             // for pointer NULL
 #include "tcg.h"
-
-// structure to enable use of FMT_SIZE32_DATA in BSG_Unpack
-typedef struct pack_buf_t {
-  UINT32 size;
-  BYTE * data;
-} pack_buf_t;
-
-// and a const version for Pack
-typedef struct pack_constbuf_t {
-  UINT32 size;
-  const BYTE* data;
-} pack_constbuf_t;
 
 typedef UINT32 tpm_size_t;
 
diff -r 03d51c0b0546 -r 89030fab2c3f tools/vtpm_manager/util/tcg.h
--- a/tools/vtpm_manager/util/tcg.h     Wed Nov  2 10:19:48 2005
+++ b/tools/vtpm_manager/util/tcg.h     Wed Nov  2 10:21:46 2005
@@ -190,6 +190,20 @@
   BOOL   fContinueAuthSession;
   TPM_AUTHDATA  HMAC;
 } TCS_AUTH;
+
+// structures for dealing with sizes followed by buffers in all the
+// TCG structure.
+typedef struct pack_buf_t {
+  UINT32 size;
+  BYTE * data;
+} pack_buf_t;
+
+typedef struct pack_constbuf_t {
+  UINT32 size;
+  const BYTE* data;
+} pack_constbuf_t;
+
+
 
 // **************************** CONSTANTS *********************************
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.