diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h index d3d6f6dde7..919c4084e4 100644 --- a/include/mbedtls/pk.h +++ b/include/mbedtls/pk.h @@ -1152,7 +1152,7 @@ int mbedtls_pk_write_pubkey(unsigned char **p, unsigned char *start, const mbedtls_pk_context *key); #endif /* MBEDTLS_PK_WRITE_C */ -#if defined(MBEDTLS_USE_PSA_CRYPTO) +#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) /** * \brief Turn an EC or RSA key into an opaque one. * @@ -1177,7 +1177,7 @@ int mbedtls_pk_wrap_as_opaque(mbedtls_pk_context *pk, psa_algorithm_t alg, psa_key_usage_t usage, psa_algorithm_t alg2); -#endif /* MBEDTLS_USE_PSA_CRYPTO */ +#endif /* MBEDTLS_PSA_CRYPTO_CLIENT */ #ifdef __cplusplus } diff --git a/library/pk.c b/library/pk.c index 87b1d8f5e2..d52c77d408 100644 --- a/library/pk.c +++ b/library/pk.c @@ -1080,7 +1080,7 @@ mbedtls_pk_type_t mbedtls_pk_get_type(const mbedtls_pk_context *ctx) return ctx->pk_info->type; } -#if defined(MBEDTLS_USE_PSA_CRYPTO) +#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) /* * Load the key to a PSA key slot, * then turn the PK context into a wrapper for that key slot. @@ -1199,5 +1199,5 @@ int mbedtls_pk_wrap_as_opaque(mbedtls_pk_context *pk, #endif /* !MBEDTLS_PK_HAVE_ECC_KEYS && !MBEDTLS_RSA_C */ return MBEDTLS_ERR_PK_TYPE_MISMATCH; } -#endif /* MBEDTLS_USE_PSA_CRYPTO */ +#endif /* MBEDTLS_PSA_CRYPTO_CLIENT */ #endif /* MBEDTLS_PK_C */