mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
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>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN)
|
||||
/*
|
||||
* AES-NI support detection routine
|
||||
*/
|
||||
@@ -68,6 +69,7 @@ int mbedtls_aesni_has_support(unsigned int what)
|
||||
|
||||
return (c & what) != 0;
|
||||
}
|
||||
#endif /* !MBEDTLS_AES_HAS_NO_BUILTIN */
|
||||
|
||||
#if MBEDTLS_AESNI_HAVE_CODE == 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user