Have selftest print more information about the AESNI build

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
Tom Cosgrove 2023-03-18 14:48:49 +00:00
parent e0c75342fc
commit 20458c0963

View File

@ -1846,7 +1846,15 @@ int mbedtls_aes_self_test(int verbose)
#endif
#if defined(MBEDTLS_AESNI_HAVE_CODE)
if (mbedtls_aesni_has_support(MBEDTLS_AESNI_AES)) {
mbedtls_printf(" AES note: using AESNI.\n");
mbedtls_printf(" AES note: using AESNI via ");
#if MBEDTLS_AESNI_HAVE_CODE == 1
mbedtls_printf("assembly");
#elif MBEDTLS_AESNI_HAVE_CODE == 2
mbedtls_printf("intrinsics");
#else
mbedtls_printf("(unknown)");
#endif
mbedtls_printf(".\n");
} else
#endif
mbedtls_printf(" AES note: built-in implementation.\n");