tee-supplicant: ioctl_emu_read_ctr(): MAC correct data

Prior to this patch was ioctl_emu_read_ctr() calculating a MAC over
among other things the uninitialized "op_result". "op_result" often
happens to be 0 which is the same as RPMB_RESULT_OK which is returned by
compute_hmac() on success. However, this field is not initialized before
calculating the MAC so it could very well differ resulting in an invalid
MAC. This patch fixes this by initializing "op_result" to RPMB_RESULT_OK
before calculating the MAC.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
1 file changed
tree: b9e77a167286db0b5145da722868e51eb467bd71
  1. libteec/
  2. public/
  3. tee-supplicant/
  4. .gitignore
  5. .travis.yml
  6. Android.mk
  7. android_flags.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. config.mk
  11. flags.mk
  12. LICENSE
  13. Makefile
  14. README.md
README.md

OP-TEE Client API

This git contains source code for the non-secure side implementation of the OP-TEE project making up the client library and tee-supplicant.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_client.

// OP-TEE core maintainers