Make use of PSA crypto hash if MBEDTLS_MD_C isn't defined

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Neil Armstrong 2022-08-11 10:47:08 +02:00
parent 0d76341eac
commit ecaba1c9b2
3 changed files with 43 additions and 5 deletions

View file

@ -108,7 +108,8 @@
#endif
#if defined(MBEDTLS_ECJPAKE_C) && \
( !defined(MBEDTLS_ECP_C) || !defined(MBEDTLS_MD_C) )
( !defined(MBEDTLS_ECP_C) || \
!( defined(MBEDTLS_MD_C) || defined(MBEDTLS_PSA_CRYPTO_C) ) )
#error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites"
#endif

View file

@ -2330,6 +2330,9 @@
* ECJPAKE
*
* Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C
*
* \warning If building without MBEDTLS_MD_C, you must call psa_crypto_init()
* before doing any EC J-PAKE operations.
*/
#define MBEDTLS_ECJPAKE_C