tpm2_import: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_listpersistent: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_load: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_loadexternal: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_makecredential: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_nvdefine: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_nvlist: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_nvread: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_nvreadlock: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_nvrelease: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_nvwrite: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_pcrevent: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_pcrextend: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_pcrlist: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_quote: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_readpublic: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_rsaencrypt: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_send: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_sign: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_startup: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_tool: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_unseal: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_verifysignature: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
lib/files: update error output
Update the tool to use the tpm2_error interfaces to print nice, human readable errors. Signed-off-by: William Roberts <william.c.roberts@intel.com>
get_max_supported_pcrs() was unused and untested, remove. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm_hash_sequence was unused, remove it. Signed-off-by: William Roberts <william.c.roberts@intel.com>
Update the error messages, and bring message handing into the lib hash routines. Thus, ubdate the return to bool and fixup the call sights to reflect this. Signed-off-by: William Roberts <william.c.roberts@intel.com>
lib/hash: update names to coding standard
lib files should be tpm2_<function>, so update tpm_hash to tpm2_hash and update external functions to have the tpm2_ prefix. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm_hmac was unused, delete it. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_nv_util: add proper error code support
Update the utility header to have proper error string support from failed TPM commands. Also, Wrap them in retry macros, add doxygen comments and update the interface to return bool. Signed-off-by: William Roberts <william.c.roberts@intel.com>
lib/tpm2_policy: update error handling output
Update the TPM calls to use the new tpm error string library. Signed-off-by: William Roberts <william.c.roberts@intel.com>
lib/tpm2_session: update error handling output
Add error string decoding output to failed TPM commands. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_encryptdecrypt: remove unused header file
Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_rc_decode: update to new error library
Remove all of the unit tests and support code for the old rc decoding library and use the new error strings as output. Signed-off-by: William Roberts <william.c.roberts@intel.com>
This accidentally slipped through code review and should have never been commited. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tests: add aux directory to PATH for tests
tools, like tpm2_rc_decode will live in aux, thus for testing, aux needs to be on PATH. Signed-off-by: William Roberts <william.c.roberts@intel.com>
tpm2_rc_decode: move to aux directory
Since tpm2_rc_decode doesn't actually talk with the TPM, move it to the aux directory. Signed-off-by: William Roberts <william.c.roberts@intel.com>
travis: add aux to path for tests
The travis scrit uses a variant directory for builds, and thus needs PATH set to point to both the tools and aux directories. It was missing the aux directory, which broke the travis build when tpm2_rc_decode was moved. Correct this by adding aux to path. Signed-off-by: William Roberts <william.c.roberts@intel.com>