diff --git a/library/aesce.c b/library/aesce.c index 2aff5670ac44..30ce7d3565ff 100644 --- a/library/aesce.c +++ b/library/aesce.c @@ -42,11 +42,9 @@ #include #include "common.h" -#if defined(MBEDTLS_AESCE_C) - #include "aesce.h" -#if defined(MBEDTLS_HAVE_ARM64) +#if MBEDTLS_AES_HAVE_AESCE #if !defined(__ARM_FEATURE_AES) || defined(MBEDTLS_ENABLE_ARM_CRYPTO_EXTENSIONS_COMPILER_FLAG) # if defined(__clang__) @@ -74,23 +72,6 @@ #include #endif -#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN) -/* - * AES instruction support detection routine - */ -int mbedtls_aesce_has_support(void) -{ -#if defined(__linux__) - unsigned long auxval = getauxval(AT_HWCAP); - return (auxval & (HWCAP_ASIMD | HWCAP_AES)) == - (HWCAP_ASIMD | HWCAP_AES); -#else - /* Assume AES instructions are supported. */ - return 1; -#endif -} -#endif - static uint8x16_t aesce_encrypt_block(uint8x16_t block, unsigned char *keys, int rounds) @@ -408,6 +389,5 @@ void mbedtls_aesce_gcm_mult(unsigned char c[16], #undef MBEDTLS_POP_TARGET_PRAGMA #endif -#endif /* MBEDTLS_HAVE_ARM64 */ -#endif /* MBEDTLS_AESCE_C */ +#endif /* MBEDTLS_AES_HAVE_AESCE */