pk_wrap: fix guards in eckey_check_pair to only include 1 option at build time

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti 2023-04-07 11:48:02 +02:00
parent 151bdf9668
commit 3f8d23eaef

View file

@ -1175,12 +1175,13 @@ static int eckey_check_pair(const void *pub, const void *prv,
(void) f_rng;
(void) p_rng;
return eckey_check_pair_psa(pub, prv);
#else /* MBEDTLS_USE_PSA_CRYPTO */
#elif defined(MBEDTLS_ECP_C)
return mbedtls_ecp_check_pub_priv((const mbedtls_ecp_keypair *) pub,
(const mbedtls_ecp_keypair *) prv,
f_rng, p_rng);
#endif /* MBEDTLS_ECP_C */
#else
return MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE;
#endif
}
static void *eckey_alloc_wrap(void)