~awe/snappy-hwe-snaps/+git/tpm2:tpm2-tss/1.0-beta_1

Last commit made on 2016-07-20
Get this branch:
git clone -b tpm2-tss/1.0-beta_1 https://git.launchpad.net/~awe/snappy-hwe-snaps/+git/tpm2
Only Tony Espy can upload to this branch. If you are Tony Espy please log in for upload directions.

Branch merges

Branch information

Name:
tpm2-tss/1.0-beta_1
Repository:
lp:~awe/snappy-hwe-snaps/+git/tpm2

Recent commits

0f1bb3e... by Gang Wei

Merge pull request #231 from flihp/doc_markdown

doc: Move *.md files into doc/ directory.

db2cf6c... by Gang Wei

Merge pull request #228 from flihp/no_sapi_client

No sapi client

b0927df... by philip

Makefile.am: Remove SAPI_CLIENT macro definition.

This macro definition is no longer required as the preprocessor tests
have been removed from the code.

Signed-off-by: Philip Tricca <email address hidden>

4c1b4a0... by philip

getcommands: Move to resourcemgr/, remove use of SAPI_CLIENT macro, fix error code

The SAPI_CLIENT macro in this function was used to get the error layer /
level right when used from different parts of the TSS. But since
getcommands is only used by the resourcemgr this additional complexity
isn't necessary. We remove the need for this macro by making this
function exclusive to the resourcemgr and move the source file to the
resourcemgr directory.

Additionally the error layer indicator was wrong: the use of
TSS2_ERROR_LEVEL( TSS2_RESMGR_ERROR_LEVEL ) causes the error level shift
to happen twice since the TSS2_RESMGR_ERROR_LEVEL in the SAPI headers
already does the first shift. Applying TSS2_ERROR_LEVEL a second time
here causes the resmgr error level bits to be shifted 32 bits which is
completely out of the TPM_RC. This seems to be the only place this error
is made.

We fix this so that the resmgr layer is identified properly when malloc
fails. We add a unit test that mocks the malloc function forcing a NULL
return value.

Signed-off-by: Philip Tricca <email address hidden>

7180029... by philip

getcommands: Remove use of malloc function pointer.

This function is only called from the resourcemgr so we really only ever
need the RM specific function pointer. Further, we have no use case to
provide a different allocation function in the RM so this only
complicates the build and makes the code more difficult to read.

Likely this was inteded to be a "future proofing" mechanism in the event
that the RM would be built on systems with different allocation
mechanisms?

Signed-off-by: Philip Tricca <email address hidden>

c31b087... by philip

ChangeLog: Add missing entries.

Signed-off-by: Philip Tricca <email address hidden>

ffab88a... by Gang Wei

tpmtest: fix a TPM2B initialization issue in test 34

this resolve issue #232.

835d305... by Gang Wei

tpmtest: disable 2 cases for nonNULL platform auth

Pcr Allocate and RM tests need platform auth, so have to be disabled
while platform auth is not NULL.

3d3fe5c... by Gang Wei

tpmtest: replace all ECB mode with CFB

So that the code can work well on most tpm models.

e03b846... by philip

Fixup bugs introduced by 3b7e71220c9 by fixing up include directives to use sapi/ instead of tss2/

Signed-off-by: Philip Tricca <email address hidden>