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>
diff --git a/library/pk_wrap.c b/library/pk_wrap.c
index ed4e752..57bfdca 100644
--- a/library/pk_wrap.c
+++ b/library/pk_wrap.c
@@ -1175,12 +1175,13 @@
(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)