Add option to disable built-in aes implementation.
For time being, there are only two aes implementations for known
architectures. I define runtime detection function as const when
built-in was disabled. In this case, compiler will remove dead
built-in code.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/aesce.h b/library/aesce.h
index b12bf76..b166e15 100644
--- a/library/aesce.h
+++ b/library/aesce.h
@@ -47,7 +47,12 @@
*
* \return 1 if CPU has support for the feature, 0 otherwise
*/
+#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN)
int mbedtls_aesce_has_support(void);
+#else
+#define /* no-check-names */ mbedtls_aesce_has_support() 1
+#endif
+
/**
* \brief Internal AES-ECB block encryption and decryption