Add check_config checks for AEAD
CCM requires one of the 128-bit-block block ciphers to be useful, just like GCM. GCM and CCM need the cipher module. ChaChaPoly needs ChaCha20 and Poly1305. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
e45ee40f7e
commit
1984800f70
1 changed files with 21 additions and 0 deletions
|
@ -177,11 +177,32 @@
|
||||||
#endif
|
#endif
|
||||||
#undef MBEDTLS_HAS_MEMSAN
|
#undef MBEDTLS_HAS_MEMSAN
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_CCM_C) && ( \
|
||||||
|
!defined(MBEDTLS_AES_C) && !defined(MBEDTLS_CAMELLIA_C) && !defined(MBEDTLS_ARIA_C) )
|
||||||
|
#error "MBEDTLS_CCM_C defined, but not all prerequisites"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_CCM_C) && !defined(MBEDTLS_CIPHER_C)
|
||||||
|
#error "MBEDTLS_CCM_C defined, but not all prerequisites"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_GCM_C) && ( \
|
#if defined(MBEDTLS_GCM_C) && ( \
|
||||||
!defined(MBEDTLS_AES_C) && !defined(MBEDTLS_CAMELLIA_C) && !defined(MBEDTLS_ARIA_C) )
|
!defined(MBEDTLS_AES_C) && !defined(MBEDTLS_CAMELLIA_C) && !defined(MBEDTLS_ARIA_C) )
|
||||||
#error "MBEDTLS_GCM_C defined, but not all prerequisites"
|
#error "MBEDTLS_GCM_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_GCM_C) && !defined(MBEDTLS_CIPHER_C)
|
||||||
|
#error "MBEDTLS_GCM_C defined, but not all prerequisites"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_CHACHAPOLY_C) && !defined(MBEDTLS_CHACHA20_C)
|
||||||
|
#error "MBEDTLS_CHACHAPOLY_C defined, but not all prerequisites"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_CHACHAPOLY_C) && !defined(MBEDTLS_POLY1305_C)
|
||||||
|
#error "MBEDTLS_CHACHAPOLY_C defined, but not all prerequisites"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
|
#if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
|
||||||
#error "MBEDTLS_ECP_RANDOMIZE_JAC_ALT defined, but not all prerequisites"
|
#error "MBEDTLS_ECP_RANDOMIZE_JAC_ALT defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue