mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-17 20:42:44 +00:00
Make check_config aware of MBEDTLS_PSA_CRYPTO_CLIENT
When check_config needs to evaluate the availability of a feature through a PSA API, it should look for MBEDTLS_PSA_CRYPTO_CLIENT instead of MBEDTLS_PSA_CRYPTO_C, to be able to cover the case where the API is provided through a client/service interface. Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
This commit is contained in:
parent
1d7bc1ecdf
commit
7889fe7917
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
/* Check that each MBEDTLS_ECP_DP_xxx symbol has its PSA_WANT_ECC_xxx counterpart
|
/* Check that each MBEDTLS_ECP_DP_xxx symbol has its PSA_WANT_ECC_xxx counterpart
|
||||||
* when PSA crypto is enabled. */
|
* when PSA crypto is enabled. */
|
||||||
#if defined(MBEDTLS_PSA_CRYPTO_CONFIG) || defined(MBEDTLS_PSA_CRYPTO_C)
|
#if defined(MBEDTLS_PSA_CRYPTO_CONFIG) || defined(MBEDTLS_PSA_CRYPTO_CLIENT)
|
||||||
|
|
||||||
#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) && !defined(PSA_WANT_ECC_BRAINPOOL_P_R1_256)
|
#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) && !defined(PSA_WANT_ECC_BRAINPOOL_P_R1_256)
|
||||||
#error "MBEDTLS_ECP_DP_BP256R1_ENABLED defined, but not its PSA counterpart"
|
#error "MBEDTLS_ECP_DP_BP256R1_ENABLED defined, but not its PSA counterpart"
|
||||||
@ -154,7 +154,7 @@
|
|||||||
#endif /* some curve accelerated */
|
#endif /* some curve accelerated */
|
||||||
|
|
||||||
#if defined(MBEDTLS_CTR_DRBG_C) && !(defined(MBEDTLS_AES_C) || \
|
#if defined(MBEDTLS_CTR_DRBG_C) && !(defined(MBEDTLS_AES_C) || \
|
||||||
(defined(MBEDTLS_PSA_CRYPTO_C) && defined(PSA_WANT_KEY_TYPE_AES) && \
|
(defined(MBEDTLS_PSA_CRYPTO_CLIENT) && defined(PSA_WANT_KEY_TYPE_AES) && \
|
||||||
defined(PSA_WANT_ALG_ECB_NO_PADDING)))
|
defined(PSA_WANT_ALG_ECB_NO_PADDING)))
|
||||||
#error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites"
|
#error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
@ -236,7 +236,7 @@
|
|||||||
|
|
||||||
#if defined(MBEDTLS_ECJPAKE_C) && \
|
#if defined(MBEDTLS_ECJPAKE_C) && \
|
||||||
( !defined(MBEDTLS_ECP_C) || \
|
( !defined(MBEDTLS_ECP_C) || \
|
||||||
!( defined(MBEDTLS_MD_C) || defined(MBEDTLS_PSA_CRYPTO_C) ) )
|
!( defined(MBEDTLS_MD_C) || defined(MBEDTLS_PSA_CRYPTO_CLIENT) ) )
|
||||||
#error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites"
|
#error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -284,15 +284,15 @@
|
|||||||
/* Helpers for hash dependencies, will be undefined at the end of the file */
|
/* Helpers for hash dependencies, will be undefined at the end of the file */
|
||||||
/* Do SHA-256, 384, 512 to cover Entropy and TLS. */
|
/* Do SHA-256, 384, 512 to cover Entropy and TLS. */
|
||||||
#if defined(MBEDTLS_SHA256_C) || \
|
#if defined(MBEDTLS_SHA256_C) || \
|
||||||
(defined(MBEDTLS_PSA_CRYPTO_C) && defined(PSA_WANT_ALG_SHA_256))
|
(defined(MBEDTLS_PSA_CRYPTO_CLIENT) && defined(PSA_WANT_ALG_SHA_256)
|
||||||
#define MBEDTLS_MD_HAVE_SHA256
|
#define MBEDTLS_MD_HAVE_SHA256
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SHA384_C) || \
|
#if defined(MBEDTLS_SHA384_C) || \
|
||||||
(defined(MBEDTLS_PSA_CRYPTO_C) && defined(PSA_WANT_ALG_SHA_384))
|
(defined(MBEDTLS_PSA_CRYPTO_CLIENT) && defined(PSA_WANT_ALG_SHA_384))
|
||||||
#define MBEDTLS_MD_HAVE_SHA384
|
#define MBEDTLS_MD_HAVE_SHA384
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SHA512_C) || \
|
#if defined(MBEDTLS_SHA512_C) || \
|
||||||
(defined(MBEDTLS_PSA_CRYPTO_C) && defined(PSA_WANT_ALG_SHA_512))
|
(defined(MBEDTLS_PSA_CRYPTO_CLIENT) && defined(PSA_WANT_ALG_SHA_512))
|
||||||
#define MBEDTLS_MD_HAVE_SHA512
|
#define MBEDTLS_MD_HAVE_SHA512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -491,7 +491,7 @@
|
|||||||
defined(MBEDTLS_SHA256_C) || \
|
defined(MBEDTLS_SHA256_C) || \
|
||||||
defined(MBEDTLS_SHA384_C) || \
|
defined(MBEDTLS_SHA384_C) || \
|
||||||
defined(MBEDTLS_SHA512_C) || \
|
defined(MBEDTLS_SHA512_C) || \
|
||||||
(defined(MBEDTLS_PSA_CRYPTO_C) && \
|
(defined(MBEDTLS_PSA_CRYPTO_CLIENT) && \
|
||||||
(defined(PSA_WANT_ALG_MD5) || \
|
(defined(PSA_WANT_ALG_MD5) || \
|
||||||
defined(PSA_WANT_ALG_RIPEMD160) || \
|
defined(PSA_WANT_ALG_RIPEMD160) || \
|
||||||
defined(PSA_WANT_ALG_SHA_1) || \
|
defined(PSA_WANT_ALG_SHA_1) || \
|
||||||
@ -503,7 +503,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_LMS_C) && \
|
#if defined(MBEDTLS_LMS_C) && \
|
||||||
! ( defined(MBEDTLS_PSA_CRYPTO_C) && defined(PSA_WANT_ALG_SHA_256) )
|
! ( defined(MBEDTLS_PSA_CRYPTO_CLIENT) && defined(PSA_WANT_ALG_SHA_256) )
|
||||||
#error "MBEDTLS_LMS_C requires MBEDTLS_PSA_CRYPTO_C and PSA_WANT_ALG_SHA_256"
|
#error "MBEDTLS_LMS_C requires MBEDTLS_PSA_CRYPTO_C and PSA_WANT_ALG_SHA_256"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -891,7 +891,7 @@
|
|||||||
* Note: for dependencies common with TLS 1.2 (running handshake hash),
|
* Note: for dependencies common with TLS 1.2 (running handshake hash),
|
||||||
* see MBEDTLS_SSL_TLS_C. */
|
* see MBEDTLS_SSL_TLS_C. */
|
||||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && \
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && \
|
||||||
!(defined(MBEDTLS_PSA_CRYPTO_C) && \
|
!(defined(MBEDTLS_PSA_CRYPTO_CLIENT) && \
|
||||||
defined(PSA_WANT_ALG_HKDF_EXTRACT) && \
|
defined(PSA_WANT_ALG_HKDF_EXTRACT) && \
|
||||||
defined(PSA_WANT_ALG_HKDF_EXPAND) && \
|
defined(PSA_WANT_ALG_HKDF_EXPAND) && \
|
||||||
(defined(PSA_WANT_ALG_SHA_256) || defined(PSA_WANT_ALG_SHA_384)))
|
(defined(PSA_WANT_ALG_SHA_256) || defined(PSA_WANT_ALG_SHA_384)))
|
||||||
@ -1089,7 +1089,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#undef MBEDTLS_THREADING_IMPL
|
#undef MBEDTLS_THREADING_IMPL
|
||||||
|
|
||||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) && !defined(MBEDTLS_PSA_CRYPTO_C)
|
#if defined(MBEDTLS_USE_PSA_CRYPTO) && !defined(MBEDTLS_PSA_CRYPTO_CLIENT)
|
||||||
#error "MBEDTLS_USE_PSA_CRYPTO defined, but not all prerequisites"
|
#error "MBEDTLS_USE_PSA_CRYPTO defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user