Allow inclusion of entropy.h when it's disabled

The build was failing in all.sh component test_no_drbg_no_sha2 because
entropy.h was referencing mbedtls_sha256_context but not including sha256.h
when SHA-256 and SHA-512 were both disabled. This broke query_config.c which
includes entropy.h (and actually all headers) unconditionally.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2020-06-17 12:13:23 +02:00
parent 301a9ee583
commit 424210a93c

View file

@ -86,6 +86,8 @@
#define MBEDTLS_ENTROPY_SOURCE_STRONG 1 /**< Entropy source is strong */
#define MBEDTLS_ENTROPY_SOURCE_WEAK 0 /**< Entropy source is weak */
#if defined(MBEDTLS_ENTROPY_C)
#ifdef __cplusplus
extern "C" {
#endif
@ -286,4 +288,6 @@ int mbedtls_entropy_source_self_test( int verbose );
}
#endif
#endif /* MBEDTLS_ENTROPY_C */
#endif /* entropy.h */