diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 31da1b45c9..bc19ed07c7 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -5559,6 +5559,7 @@ static psa_status_t psa_generate_derived_ecc_key_weierstrass_helper( uint8_t **data ) { +#if defined(MBEDTLS_ECP_C) unsigned key_out_of_range = 1; mbedtls_mpi k; mbedtls_mpi diff_N_2; @@ -5642,6 +5643,13 @@ cleanup: mbedtls_mpi_free(&k); mbedtls_mpi_free(&diff_N_2); return status; +#else /* MBEDTLS_ECP_C */ + (void) slot; + (void) bits; + (void) operation; + (void) data; + return PSA_ERROR_NOT_SUPPORTED; +#endif /* MBEDTLS_ECP_C */ } /* ECC keys on a Montgomery elliptic curve draws a byte string whose length