diff --git a/library/aesce.h b/library/aesce.h index 1b2edad41..a67fc0d9c 100644 --- a/library/aesce.h +++ b/library/aesce.h @@ -33,6 +33,9 @@ #if !defined(MBEDTLS_HAVE_ARM64) #if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) #define MBEDTLS_HAVE_ARM64 +#if !defined(MBEDTLS_AESCE_C) && !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) +#error "MBEDTLS_AESCE_C defined, but not all prerequisites" +#endif #endif #endif diff --git a/library/aesni.h b/library/aesni.h index 341350a1e..1c960703f 100644 --- a/library/aesni.h +++ b/library/aesni.h @@ -39,6 +39,9 @@ (defined(__amd64__) || defined(__x86_64__)) && \ !defined(MBEDTLS_HAVE_X86_64) #define MBEDTLS_HAVE_X86_64 +#if !defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) +#error "MBEDTLS_AESCE_C defined, but not all prerequisites" +#endif #endif #if defined(MBEDTLS_AESNI_C) diff --git a/library/padlock.h b/library/padlock.h index 7ec960d7a..415838685 100644 --- a/library/padlock.h +++ b/library/padlock.h @@ -47,6 +47,10 @@ #include +#if !defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) +#error "MBEDTLS_AESCE_C defined, but not all prerequisites" +#endif + #define MBEDTLS_PADLOCK_RNG 0x000C #define MBEDTLS_PADLOCK_ACE 0x00C0 #define MBEDTLS_PADLOCK_PHE 0x0C00