core: mbedtls: add curve type to domain parameter group ID conversion

MBedTLS functions mbedtls_ecp_group_load() and mbedtls_ecdsa_genkey()
take a group ID parameter of type mbedtls_ecp_group_id which is an enum
(MBEDTLS_ECP_DP_SECP192R1, etc.). The code in lib/libmbedtls/core/ecc.c
incorrectly passes a uint32_t TEE curve ID instead
(TEE_ECC_CURVE_NIST_P192, etc.). By chance the values happen to be the
same for all the NIST curves, but not for SM2. Fix that by introducing a
conversion function.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
1 file changed
tree: 6421b22ccbc38897ec6ebefd17e68a220f95f883
  1. .github/
  2. core/
  3. keys/
  4. ldelf/
  5. lib/
  6. mk/
  7. scripts/
  8. ta/
  9. .azure-pipelines.yml
  10. .checkpatch.conf
  11. .gitattributes
  12. .gitignore
  13. CHANGELOG.md
  14. LICENSE
  15. MAINTAINERS
  16. Makefile
  17. README.md
  18. typedefs.checkpatch
README.md

OP-TEE Trusted OS

This git contains source code for the secure side implementation of OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io.

// OP-TEE core maintainers