diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h index 931630724e..d3d6f6dde7 100644 --- a/include/mbedtls/pk.h +++ b/include/mbedtls/pk.h @@ -447,7 +447,7 @@ static inline size_t mbedtls_pk_get_len(const mbedtls_pk_context *ctx) */ int mbedtls_pk_can_do(const mbedtls_pk_context *ctx, mbedtls_pk_type_t type); -#if defined(MBEDTLS_USE_PSA_CRYPTO) +#if defined(MBEDTLS_PSA_CRYPTO_C) /** * \brief Tell if context can do the operation given by PSA algorithm * @@ -477,7 +477,7 @@ int mbedtls_pk_can_do(const mbedtls_pk_context *ctx, mbedtls_pk_type_t type); */ int mbedtls_pk_can_do_ext(const mbedtls_pk_context *ctx, psa_algorithm_t alg, psa_key_usage_t usage); -#endif /* MBEDTLS_USE_PSA_CRYPTO */ +#endif /* MBEDTLS_PSA_CRYPTO_C */ #if defined(MBEDTLS_PSA_CRYPTO_C) /** diff --git a/library/pk.c b/library/pk.c index e7a2af4582..87b1d8f5e2 100644 --- a/library/pk.c +++ b/library/pk.c @@ -238,7 +238,7 @@ int mbedtls_pk_can_do(const mbedtls_pk_context *ctx, mbedtls_pk_type_t type) return ctx->pk_info->can_do(type); } -#if defined(MBEDTLS_USE_PSA_CRYPTO) +#if defined(MBEDTLS_PSA_CRYPTO_C) /* * Tell if a PK can do the operations of the given PSA algorithm */ @@ -376,7 +376,7 @@ int mbedtls_pk_can_do_ext(const mbedtls_pk_context *ctx, psa_algorithm_t alg, return 0; } -#endif /* MBEDTLS_USE_PSA_CRYPTO */ +#endif /* MBEDTLS_PSA_CRYPTO_C */ #if defined(MBEDTLS_PSA_CRYPTO_C) #if defined(MBEDTLS_RSA_C) diff --git a/tests/suites/test_suite_pk.function b/tests/suites/test_suite_pk.function index ff843cb8d0..a625b56ab8 100644 --- a/tests/suites/test_suite_pk.function +++ b/tests/suites/test_suite_pk.function @@ -332,7 +332,7 @@ exit: } #endif -#if defined(MBEDTLS_USE_PSA_CRYPTO) +#if defined(MBEDTLS_PSA_CRYPTO_C) /* * Generate an ECC key using PSA and return the key identifier of that key, @@ -377,7 +377,7 @@ mbedtls_svc_key_id_t pk_psa_genkey_rsa(void) exit: return key; } -#endif /* MBEDTLS_USE_PSA_CRYPTO */ +#endif /* MBEDTLS_PSA_CRYPTO_C */ /* END_HEADER */ /* BEGIN_DEPENDENCIES @@ -385,7 +385,7 @@ exit: * END_DEPENDENCIES */ -/* BEGIN_CASE depends_on:MBEDTLS_USE_PSA_CRYPTO */ +/* BEGIN_CASE depends_on:MBEDTLS_PSA_CRYPTO_C */ void pk_psa_utils(int key_is_rsa) { mbedtls_pk_context pk, pk2; @@ -487,7 +487,7 @@ exit: } /* END_CASE */ -/* BEGIN_CASE depends_on:MBEDTLS_USE_PSA_CRYPTO */ +/* BEGIN_CASE depends_on:MBEDTLS_PSA_CRYPTO_C */ void pk_can_do_ext(int opaque_key, int key_type, int key_usage, int key_alg, int key_alg2, int curve_or_keybits, int alg_check, int usage_check, int result)