libckteec: one shot encryption/decryption may have no input data

Change the one shot encryption and decryption handler function to
allow input buffer reference to be NULL. This may happen for example
with AES GCM operation where encryption of a NULL buffer is expected to
produce an AES GCM authentication tag. Before this change, providing a
NULL buffer to C_Encrypt() made ckteec_register_shm() to fail and
ckteec_register_shm() to return CKR_HOST_MEMORY error code.

Fixes: aa3dd58d605e ("libckteec: Allow 0 length input buffer  for update operations.")
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
1 file changed
tree: 61e9c226bfd8329ccb828ea65dbe7cd8f9c94077
  1. .github/
  2. ci/
  3. libckteec/
  4. libseteec/
  5. libteeacl/
  6. libteec/
  7. scripts/
  8. tee-supplicant/
  9. .gitattributes
  10. .gitignore
  11. Android.bp
  12. CMakeLists.txt
  13. CMakeToolchain.txt
  14. config.mk
  15. flags.mk
  16. LICENSE
  17. Makefile
  18. optee_client.device.mk
  19. README.md
  20. typedefs.checkpatch
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