Hello community, here is the log from the commit of package trousers for openSUSE:Factory checked in at 2012-05-31 17:11:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trousers (Old) and /work/SRC/openSUSE:Factory/.trousers.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trousers", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/trousers/trousers.changes 2012-03-29 07:49:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.trousers.new/trousers.changes 2012-05-31 17:11:20.000000000 +0200 @@ -1,0 +2,6 @@ +Fri May 18 11:04:43 CEST 2012 - [email protected] + +- Updated to trousers 0.3.9 + - lots of bugfixes + +------------------------------------------------------------------- Old: ---- trousers-0.3.8.diff trousers-0.3.8.tar.gz New: ---- trousers-0.3.9.diff trousers-0.3.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trousers.spec ++++++ --- /var/tmp/diff_new_pack.FXFIGU/_old 2012-05-31 17:11:22.000000000 +0200 +++ /var/tmp/diff_new_pack.FXFIGU/_new 2012-05-31 17:11:22.000000000 +0200 @@ -23,7 +23,7 @@ Name: trousers Url: http://trousers.sourceforge.net/ -Version: 0.3.8 +Version: 0.3.9 Release: 0 Summary: TSS (TCG Software Stack) access daemon for a TPM chip License: CPL-1.0 ++++++ trousers-0.3.8.diff -> trousers-0.3.9.diff ++++++ ++++++ trousers-0.3.8.tar.gz -> trousers-0.3.9.tar.gz ++++++ ++++ 16441 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/configure.in new/trousers-0.3.9/configure.in --- old/trousers-0.3.8/configure.in 2011-12-24 07:16:22.000000000 +0100 +++ new/trousers-0.3.9/configure.in 2012-05-17 21:41:18.000000000 +0200 @@ -2,7 +2,7 @@ # configure.in for the trousers project # -AC_INIT(trousers, 0.3.8, [email protected]) +AC_INIT(trousers, 0.3.9, [email protected]) TSS_SPEC_MAJOR=1 TSS_SPEC_MINOR=2 @@ -33,6 +33,9 @@ fi fi +#FIXME: can't reproduce the unused variable issues, placing this workaround for now. +CFLAGS="${CFLAGS} -Wno-unused-but-set-variable + # Arch specific stuff case $target in *ppc64* | *powerpc64* | *x86_64*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/include/rpc_tcstp.h new/trousers-0.3.9/src/include/rpc_tcstp.h --- old/trousers-0.3.8/src/include/rpc_tcstp.h 2010-01-28 17:27:51.000000000 +0100 +++ new/trousers-0.3.9/src/include/rpc_tcstp.h 2012-01-17 18:24:15.000000000 +0100 @@ -31,7 +31,7 @@ struct tcsd_comm_data { BYTE *buf; - int buf_size; + UINT32 buf_size; struct tcsd_packet_hdr hdr; } STRUCTURE_PACKING_ATTRIBUTE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/include/rpc_tcstp_tcs.h new/trousers-0.3.9/src/include/rpc_tcstp_tcs.h --- old/trousers-0.3.8/src/include/rpc_tcstp_tcs.h 2010-01-28 17:27:51.000000000 +0100 +++ new/trousers-0.3.9/src/include/rpc_tcstp_tcs.h 2012-01-17 18:24:15.000000000 +0100 @@ -392,8 +392,8 @@ void UnloadBlob_LOADKEY_INFO(UINT64 *, BYTE *, TCS_LOADKEY_INFO *); void LoadBlob_PCR_EVENT(UINT64 *, BYTE *, TSS_PCR_EVENT *); TSS_RESULT UnloadBlob_PCR_EVENT(UINT64 *, BYTE *, TSS_PCR_EVENT *); -int setData(TCSD_PACKET_TYPE, int, void *, int, struct tcsd_comm_data *); -UINT32 getData(TCSD_PACKET_TYPE, int, void *, int, struct tcsd_comm_data *); +int setData(TCSD_PACKET_TYPE, unsigned int, void *, int, struct tcsd_comm_data *); +UINT32 getData(TCSD_PACKET_TYPE, unsigned int, void *, int, struct tcsd_comm_data *); void initData(struct tcsd_comm_data *, int); int recv_from_socket(int, void *, int); int send_to_socket(int, void *, int); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/include/tcs_tsp.h new/trousers-0.3.9/src/include/tcs_tsp.h --- old/trousers-0.3.8/src/include/tcs_tsp.h 2010-01-28 17:27:51.000000000 +0100 +++ new/trousers-0.3.9/src/include/tcs_tsp.h 2012-02-08 19:16:53.000000000 +0100 @@ -90,4 +90,9 @@ /* needed by execute transport in the TSP */ #define TSS_TPM_TXBLOB_HDR_LEN (sizeof(UINT16) + (2 * sizeof(UINT32))) +#define TSS_TPM_TXBLOB_SIZE (4096) +#define TSS_TXBLOB_WRAPPEDCMD_OFFSET (TSS_TPM_TXBLOB_HDR_LEN + sizeof(UINT32)) +#define TSS_MAX_AUTHS_CAP (1024) +#define TSS_REQ_MGR_MAX_RETRIES (5) + #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/include/tcs_utils.h new/trousers-0.3.9/src/include/tcs_utils.h --- old/trousers-0.3.8/src/include/tcs_utils.h 2011-12-24 05:15:02.000000000 +0100 +++ new/trousers-0.3.9/src/include/tcs_utils.h 2012-02-14 16:27:32.000000000 +0100 @@ -92,11 +92,6 @@ #define EVENT_LOG_final() #endif -#define TSS_TPM_TXBLOB_SIZE (4096) -#define TSS_TXBLOB_WRAPPEDCMD_OFFSET (TSS_TPM_TXBLOB_HDR_LEN + sizeof(UINT32)) -#define TSS_MAX_AUTHS_CAP (1024) -#define TSS_REQ_MGR_MAX_RETRIES (5) - #define next( x ) x = x->next TSS_RESULT key_mgr_dec_ref_count(TCS_KEY_HANDLE); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tcs/rpc/tcstp/rpc.c new/trousers-0.3.9/src/tcs/rpc/tcstp/rpc.c --- old/trousers-0.3.8/src/tcs/rpc/tcstp/rpc.c 2010-06-09 22:18:45.000000000 +0200 +++ new/trousers-0.3.9/src/tcs/rpc/tcstp/rpc.c 2012-05-17 19:42:11.000000000 +0200 @@ -181,7 +181,7 @@ int setData(TCSD_PACKET_TYPE dataType, - int index, + unsigned int index, void *theData, int theDataSize, struct tcsd_comm_data *comm) @@ -194,11 +194,8 @@ offset = 0; if ((result = loadData(&offset, dataType, theData, theDataSize, NULL)) != TSS_SUCCESS) return result; - if (((int)comm->hdr.packet_size + (int)offset) < 0) { - LogError("Too much data to be transmitted!"); - return TCSERR(TSS_E_INTERNAL_ERROR); - } - if (((int)comm->hdr.packet_size + (int)offset) > comm->buf_size) { + + if ((comm->hdr.packet_size + offset) > comm->buf_size) { /* reallocate the buffer */ BYTE *buffer; int buffer_size = comm->hdr.packet_size + offset; @@ -229,13 +226,18 @@ UINT32 getData(TCSD_PACKET_TYPE dataType, - int index, + unsigned int index, void *theData, int theDataSize, struct tcsd_comm_data *comm) { UINT64 old_offset, offset; - TCSD_PACKET_TYPE *type = (TCSD_PACKET_TYPE *)(comm->buf + comm->hdr.type_offset) + index; + TCSD_PACKET_TYPE *type; + + if ((comm->hdr.type_offset + index) > comm->buf_size) + return TSS_TCP_RPC_BAD_PACKET_TYPE; + + type = (comm->buf + comm->hdr.type_offset) + index; if ((UINT32)index >= comm->hdr.num_parms || dataType != *type) { LogDebug("Data type of TCS packet element %d doesn't match.", index); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tcs/tcs_key_mem_cache.c new/trousers-0.3.9/src/tcs/tcs_key_mem_cache.c --- old/trousers-0.3.8/src/tcs/tcs_key_mem_cache.c 2011-12-24 05:15:02.000000000 +0100 +++ new/trousers-0.3.9/src/tcs/tcs_key_mem_cache.c 2012-02-14 16:28:56.000000000 +0100 @@ -1027,8 +1027,17 @@ offset = 0; LoadBlob_TSS_KEY(&offset, keyBlob, myKey); - if ((result = TCSP_LoadKeyByBlob_Internal(hContext, parentHandle, offset, keyBlob, - NULL, &tcsKeyHandle, slotOut))) + if (TPM_VERSION_IS(1,2)) + result = TCSP_LoadKey2ByBlob_Internal(hContext, + parentHandle, offset, + keyBlob, NULL, + &tcsKeyHandle); + else + result = TCSP_LoadKeyByBlob_Internal(hContext, + parentHandle, offset, + keyBlob, NULL, + &tcsKeyHandle, slotOut); + if (result) return result; return ctx_mark_key_loaded(hContext, tcsKeyHandle); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tcs/tcs_pbg.c new/trousers-0.3.9/src/tcs/tcs_pbg.c --- old/trousers-0.3.8/src/tcs/tcs_pbg.c 2010-09-10 21:50:27.000000000 +0200 +++ new/trousers-0.3.9/src/tcs/tcs_pbg.c 2012-02-10 17:31:27.000000000 +0100 @@ -710,6 +710,9 @@ return TCSERR(TSS_E_OUTOFMEMORY); } + if ((offset1 + offset2) > TSS_TPM_TXBLOB_SIZE) + return TCSERR(TSS_E_INTERNAL_ERROR); + memcpy(*data, &b[offset1], offset2); *data_len = offset2; break; @@ -728,6 +731,9 @@ return TCSERR(TSS_E_INTERNAL_ERROR); } + if ((offset2 + TPM_DIGEST_SIZE) > TSS_TPM_TXBLOB_SIZE) + return TCSERR(TSS_E_INTERNAL_ERROR); + if (digest1) { offset1 = offset2 = len - TPM_DIGEST_SIZE; memcpy(digest1, &b[offset2], TPM_DIGEST_SIZE); @@ -761,6 +767,9 @@ return TCSERR(TSS_E_INTERNAL_ERROR); } + if (len > TSS_TPM_TXBLOB_SIZE) + return TCSERR(TSS_E_INTERNAL_ERROR); + offset2 = len - TPM_DIGEST_SIZE; memcpy(digest2, &b[offset2], TPM_DIGEST_SIZE); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tcs/tcs_utils.c new/trousers-0.3.9/src/tcs/tcs_utils.c --- old/trousers-0.3.8/src/tcs/tcs_utils.c 2011-12-24 05:21:33.000000000 +0100 +++ new/trousers-0.3.9/src/tcs/tcs_utils.c 2012-01-17 18:24:15.000000000 +0100 @@ -203,7 +203,7 @@ void LoadBlob(UINT64 *offset, UINT32 size, BYTE *container, BYTE *object) { - if (size == 0) + if ((size == 0) || ((*offset + size) > TSS_TPM_TXBLOB_SIZE)) return; if (container) @@ -214,7 +214,7 @@ void UnloadBlob(UINT64 *offset, UINT32 size, BYTE *container, BYTE *object) { - if (size == 0) + if ((size == 0) || ((*offset + size) > TSS_TPM_TXBLOB_SIZE)) return; if (object) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tcs/tcsi_ps.c new/trousers-0.3.9/src/tcs/tcsi_ps.c --- old/trousers-0.3.8/src/tcs/tcsi_ps.c 2011-12-24 05:15:02.000000000 +0100 +++ new/trousers-0.3.9/src/tcs/tcsi_ps.c 2012-05-17 19:42:13.000000000 +0200 @@ -501,6 +501,7 @@ TCS_KEY_HANDLE * phKeyTCSI) /* out */ { UINT32 keyslot = 0, keySize; + UINT32 ordinal; TSS_RESULT result; TSS_UUID parentUuid; BYTE keyBlob[0x1000]; @@ -508,6 +509,11 @@ UINT64 offset; TCS_KEY_HANDLE parentTCSKeyHandle; + if (TPM_VERSION_IS(1,2)) + ordinal = TPM_ORD_LoadKey2; + else + ordinal = TPM_ORD_LoadKey; + LogDebugFn("Enter: uuid: 0x%lx auth? 0x%x ***********", (unsigned long)KeyUUID, pLoadKeyInfo == NULL ? 0xdeadbeef : pLoadKeyInfo->authData.AuthHandle); @@ -525,10 +531,10 @@ &keyslot)) return TCSERR(TCS_E_KM_LOADFAILED); - return TCSP_LoadKeyByBlob_Internal(hContext, parentTCSKeyHandle, - blobSize, keyBlob, - &pLoadKeyInfo->authData, - phKeyTCSI, &keyslot); + return LoadKeyByBlob_Internal(ordinal, hContext, parentTCSKeyHandle, + blobSize, keyBlob, + &pLoadKeyInfo->authData, + phKeyTCSI, &keyslot); } /* if KeyUUID is already loaded, increment the ref count and return */ @@ -561,16 +567,16 @@ pLoadKeyInfo, &parentTCSKeyHandle))) return result; - LogDebugFn("calling TCSP_LoadKeyByBlob_Internal"); + LogDebugFn("calling LoadKeyByBlob_Internal"); /******************************************************* * If no errors have happend up till now, then the parent is loaded and ready for use. * The parent's TCS Handle should be in parentTCSKeyHandle. ******************************************************/ - if ((result = TCSP_LoadKeyByBlob_Internal(hContext, parentTCSKeyHandle, - keySize, keyBlob, - NULL, - phKeyTCSI, &keyslot))) { - LogDebugFn("TCSP_LoadKeyByBlob_Internal returned 0x%x", result); + if ((result = LoadKeyByBlob_Internal(ordinal, hContext, parentTCSKeyHandle, + keySize, keyBlob, + NULL, + phKeyTCSI, &keyslot))) { + LogDebugFn("LoadKeyByBlob_Internal returned 0x%x", result); if (result == TCPA_E_AUTHFAIL && pLoadKeyInfo) { BYTE blob[1000]; @@ -580,7 +586,7 @@ /* calculate the paramDigest */ offset = 0; - LoadBlob_UINT32(&offset, TPM_ORD_LoadKey, blob); + LoadBlob_UINT32(&offset, ordinal, blob); LoadBlob(&offset, keySize, blob, keyBlob); if (Hash(TSS_HASH_SHA1, offset, blob, (BYTE *)&pLoadKeyInfo->paramDigest.digest)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tcsd/tcsd_threads.c new/trousers-0.3.9/src/tcsd/tcsd_threads.c --- old/trousers-0.3.8/src/tcsd/tcsd_threads.c 2010-09-10 21:50:27.000000000 +0200 +++ new/trousers-0.3.9/src/tcsd/tcsd_threads.c 2012-02-08 19:16:53.000000000 +0100 @@ -360,7 +360,7 @@ break; } - if (recv_size > data->comm.buf_size ) { + if (recv_size > (int) data->comm.buf_size ) { BYTE *new_buffer; LogDebug("Increasing communication buffer to %d bytes.", recv_size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/trspi/trousers.c new/trousers-0.3.9/src/trspi/trousers.c --- old/trousers-0.3.8/src/trspi/trousers.c 2011-09-21 17:36:51.000000000 +0200 +++ new/trousers-0.3.9/src/trspi/trousers.c 2012-02-08 19:16:53.000000000 +0100 @@ -28,7 +28,7 @@ #include "capabilities.h" #include "tsplog.h" #include "obj.h" - +#include "tcs_tsp.h" void Trspi_UnloadBlob_NONCE(UINT64 *offset, BYTE *blob, TPM_NONCE *n) @@ -103,6 +103,10 @@ { if (size == 0) return; + + if ((*offset + size) > TSS_TPM_TXBLOB_SIZE) + return; + if (to) memcpy(&to[(*offset)], from, size); (*offset) += size; @@ -113,6 +117,10 @@ { if (size <= 0) return; + + if ((*offset + size) > TSS_TPM_TXBLOB_SIZE) + return; + if (to) memcpy(to, &from[*offset], size); (*offset) += size; @@ -121,6 +129,9 @@ void Trspi_LoadBlob_BYTE(UINT64 *offset, BYTE data, BYTE *blob) { + if ((*offset + sizeof(BYTE)) > TSS_TPM_TXBLOB_SIZE) + return; + if (blob) blob[*offset] = data; (*offset)++; @@ -129,6 +140,9 @@ void Trspi_UnloadBlob_BYTE(UINT64 *offset, BYTE *dataOut, BYTE *blob) { + if ((*offset + sizeof(BYTE)) > TSS_TPM_TXBLOB_SIZE) + return; + if (dataOut) *dataOut = blob[*offset]; (*offset)++; @@ -153,6 +167,9 @@ void Trspi_LoadBlob_UINT64(UINT64 *offset, UINT64 in, BYTE *blob) { + if ((*offset + sizeof(UINT64)) > TSS_TPM_TXBLOB_SIZE) + return; + if (blob) UINT64ToArray(in, &blob[*offset]); (*offset) += sizeof(UINT64); @@ -161,6 +178,9 @@ void Trspi_LoadBlob_UINT32(UINT64 *offset, UINT32 in, BYTE *blob) { + if ((*offset + sizeof(UINT32)) > TSS_TPM_TXBLOB_SIZE) + return; + if (blob) UINT32ToArray(in, &blob[*offset]); (*offset) += sizeof(UINT32); @@ -169,6 +189,9 @@ void Trspi_LoadBlob_UINT16(UINT64 *offset, UINT16 in, BYTE *blob) { + if ((*offset + sizeof(UINT16)) > TSS_TPM_TXBLOB_SIZE) + return; + if (blob) UINT16ToArray(in, &blob[*offset]); (*offset) += sizeof(UINT16); @@ -177,6 +200,9 @@ void Trspi_UnloadBlob_UINT64(UINT64 *offset, UINT64 *out, BYTE *blob) { + if ((*offset + sizeof(UINT64)) > TSS_TPM_TXBLOB_SIZE) + return; + if (out) *out = Decode_UINT64(&blob[*offset]); (*offset) += sizeof(UINT64); @@ -185,6 +211,9 @@ void Trspi_UnloadBlob_UINT32(UINT64 *offset, UINT32 *out, BYTE *blob) { + if ((*offset + sizeof(UINT32)) > TSS_TPM_TXBLOB_SIZE) + return; + if (out) *out = Decode_UINT32(&blob[*offset]); (*offset) += sizeof(UINT32); @@ -193,6 +222,9 @@ void Trspi_UnloadBlob_UINT16(UINT64 *offset, UINT16 *out, BYTE *blob) { + if ((*offset + sizeof(UINT16)) > TSS_TPM_TXBLOB_SIZE) + return; + if (out) *out = Decode_UINT16(&blob[*offset]); (*offset) += sizeof(UINT16); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tspi/obj_migdata.c new/trousers-0.3.9/src/tspi/obj_migdata.c --- old/trousers-0.3.8/src/tspi/obj_migdata.c 2011-12-24 05:15:12.000000000 +0100 +++ new/trousers-0.3.9/src/tspi/obj_migdata.c 2012-05-17 19:42:11.000000000 +0200 @@ -578,7 +578,7 @@ done: obj_list_put(&migdata_list); - return TSS_SUCCESS; + return result; } TSS_RESULT @@ -656,7 +656,7 @@ done: obj_list_put(&migdata_list); - return TSS_SUCCESS; + return result; } TSS_RESULT @@ -734,7 +734,7 @@ done: obj_list_put(&migdata_list); - return TSS_SUCCESS; + return result; } TSS_RESULT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tspi/rpc/tcstp/rpc.c new/trousers-0.3.9/src/tspi/rpc/tcstp/rpc.c --- old/trousers-0.3.8/src/tspi/rpc/tcstp/rpc.c 2010-03-11 21:26:51.000000000 +0100 +++ new/trousers-0.3.9/src/tspi/rpc/tcstp/rpc.c 2012-02-08 19:16:53.000000000 +0100 @@ -123,11 +123,11 @@ offset = 0; if ((result = loadData(&offset, dataType, theData, theDataSize, NULL))) return result; - if (((int)comm->hdr.packet_size + (int)offset) < 0) { + if ((comm->hdr.packet_size + offset) > TSS_TPM_TXBLOB_SIZE) { LogError("Too much data to be transmitted!"); return TSPERR(TSS_E_INTERNAL_ERROR); } - if (((int)comm->hdr.packet_size + (int)offset) > comm->buf_size) { + if ((comm->hdr.packet_size + offset) > comm->buf_size) { /* reallocate the buffer */ BYTE *buffer; int buffer_size = comm->hdr.packet_size + offset; @@ -389,7 +389,7 @@ buffer = hte->comm.buf; recv_size = sizeof(struct tcsd_packet_hdr); - if ((recv_size = recv_from_socket(sd, buffer, recv_size)) < 0) { + if (recv_from_socket(sd, buffer, recv_size) < 0) { result = TSPERR(TSS_E_COMM_FAILURE); goto err_exit; } @@ -404,7 +404,7 @@ goto err_exit; } - if (recv_size > hte->comm.buf_size ) { + if (recv_size > (int) hte->comm.buf_size ) { BYTE *new_buffer; LogDebug("Increasing communication buffer to %d bytes.", recv_size); @@ -421,7 +421,7 @@ /* get the rest of the packet */ recv_size -= sizeof(struct tcsd_packet_hdr); /* already received the header */ - if ((recv_size = recv_from_socket(sd, buffer, recv_size)) < 0) { + if (recv_from_socket(sd, buffer, recv_size) < 0) { result = TSPERR(TSS_E_COMM_FAILURE); goto err_exit; } @@ -464,7 +464,7 @@ goto err_exit; } - if (recv_size > hte->comm.buf_size ) { + if (recv_size > (int) hte->comm.buf_size ) { BYTE *new_buffer; LogDebug("Increasing communication buffer to %d bytes.", recv_size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/trousers-0.3.8/src/tspi/tspi_ps.c new/trousers-0.3.9/src/tspi/tspi_ps.c --- old/trousers-0.3.8/src/tspi/tspi_ps.c 2011-12-24 05:15:02.000000000 +0100 +++ new/trousers-0.3.9/src/tspi/tspi_ps.c 2012-02-14 16:28:49.000000000 +0100 @@ -44,6 +44,7 @@ TCS_LOADKEY_INFO info; UINT32 ulPubKeyLength; BYTE *rgbPubKey; + TPM_COMMAND_CODE ordinal; if (phKey == NULL) return TSPERR(TSS_E_BAD_PARAMETER); @@ -51,6 +52,9 @@ if ((!obj_is_context(tspContext))) return TSPERR(TSS_E_INVALID_HANDLE); + if ((result = obj_context_get_loadkey_ordinal(tspContext, &ordinal))) + return result; + /* This key is in the System Persistant storage */ if (persistentStorageType == TSS_PS_TYPE_SYSTEM) { #if 1 @@ -78,7 +82,7 @@ &hPolicy, NULL)) return result; - if (secret_PerformAuth_OIAP(keyHandle, TPM_ORD_LoadKey, hPolicy, FALSE, + if (secret_PerformAuth_OIAP(keyHandle, ordinal, hPolicy, FALSE, &info.paramDigest, &info.authData)) return result; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
