Simplify and fix dependency of MD_C on a hash
Simplify: let's take advantage of the MD_CAN macros instead of doing it again ourselves. Fix: SHA-3 was forgotten. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
68608b2317
commit
7eb3f9a523
1 changed files with 13 additions and 17 deletions
|
@ -468,23 +468,19 @@
|
||||||
#error "!MBEDTLS_SSL_KEEP_PEER_CERTIFICATE requires MBEDTLS_SHA512_C, MBEDTLS_SHA256_C or MBEDTLS_SHA1_C"
|
#error "!MBEDTLS_SSL_KEEP_PEER_CERTIFICATE requires MBEDTLS_SHA512_C, MBEDTLS_SHA256_C or MBEDTLS_SHA1_C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_MD_C) && !( \
|
#if defined(MBEDTLS_MD_C) && \
|
||||||
defined(MBEDTLS_MD5_C) || \
|
!defined(MBEDTLS_MD_CAN_MD5) && \
|
||||||
defined(MBEDTLS_RIPEMD160_C) || \
|
!defined(MBEDTLS_MD_CAN_RIPEMD160) && \
|
||||||
defined(MBEDTLS_SHA1_C) || \
|
!defined(MBEDTLS_MD_CAN_SHA1) && \
|
||||||
defined(MBEDTLS_SHA224_C) || \
|
!defined(MBEDTLS_MD_CAN_SHA224) && \
|
||||||
defined(MBEDTLS_SHA256_C) || \
|
!defined(MBEDTLS_MD_CAN_SHA256) && \
|
||||||
defined(MBEDTLS_SHA384_C) || \
|
!defined(MBEDTLS_MD_CAN_SHA384) && \
|
||||||
defined(MBEDTLS_SHA512_C) || \
|
!defined(MBEDTLS_MD_CAN_SHA512) && \
|
||||||
(defined(MBEDTLS_PSA_CRYPTO_C) && \
|
!defined(MBEDTLS_MD_CAN_SHA3_224) && \
|
||||||
(defined(PSA_WANT_ALG_MD5) || \
|
!defined(MBEDTLS_MD_CAN_SHA3_256) && \
|
||||||
defined(PSA_WANT_ALG_RIPEMD160) || \
|
!defined(MBEDTLS_MD_CAN_SHA3_384) && \
|
||||||
defined(PSA_WANT_ALG_SHA_1) || \
|
!defined(MBEDTLS_MD_CAN_SHA3_512)
|
||||||
defined(PSA_WANT_ALG_SHA_224) || \
|
#error "MBEDTLS_MD_C defined, but no hash algorithm"
|
||||||
defined(PSA_WANT_ALG_SHA_256) || \
|
|
||||||
defined(PSA_WANT_ALG_SHA_384) || \
|
|
||||||
defined(PSA_WANT_ALG_SHA_512))))
|
|
||||||
#error "MBEDTLS_MD_C defined, but not all prerequisites"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_LMS_C) && \
|
#if defined(MBEDTLS_LMS_C) && \
|
||||||
|
|
Loading…
Reference in a new issue