From 315fd30201d8866e15e28c9fb5f2b0cf22c47cd5 Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Tue, 18 Apr 2023 11:19:54 +0800 Subject: [PATCH] Rename plain c disable option Signed-off-by: Jerry Yu --- .travis.yml | 2 +- include/mbedtls/mbedtls_config.h | 2 +- library/aesce.c | 2 +- library/aesce.h | 2 +- library/aesni.c | 4 ++-- library/aesni.h | 2 +- library/padlock.c | 2 +- library/padlock.h | 2 +- tests/scripts/all.sh | 6 +++--- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ed130aa97..04647be63c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -147,7 +147,7 @@ jobs: - scripts/config.py unset MBEDTLS_AESNI_C - scripts/config.py unset MBEDTLS_PADLOCK_C - scripts/config.py set MBEDTLS_AESCE_C - - scripts/config.py set MBEDTLS_AES_HAS_NO_BUILTIN + - scripts/config.py set MBEDTLS_AES_HAS_NO_PLAIN_C - make generated_files - make - programs/test/selftest diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h index a086bfe5d9..d5753ca2f0 100644 --- a/include/mbedtls/mbedtls_config.h +++ b/include/mbedtls/mbedtls_config.h @@ -4009,6 +4009,6 @@ /* * Platform independent implementation for crypto algorithms. */ -//#define MBEDTLS_AES_HAS_NO_BUILTIN /* Uncomment to disable built-in platform independent code of AES */ +//#define MBEDTLS_AES_HAS_NO_PLAIN_C /* Uncomment to disable built-in platform independent code of AES */ /** \} name SECTION: Module configuration options */ diff --git a/library/aesce.c b/library/aesce.c index baa01dbd6b..982cad6931 100644 --- a/library/aesce.c +++ b/library/aesce.c @@ -99,7 +99,7 @@ #include #endif -#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN) +#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) /* * AES instruction support detection routine */ diff --git a/library/aesce.h b/library/aesce.h index b166e15c17..1b2edad415 100644 --- a/library/aesce.h +++ b/library/aesce.h @@ -47,7 +47,7 @@ extern "C" { * * \return 1 if CPU has support for the feature, 0 otherwise */ -#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN) +#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) int mbedtls_aesce_has_support(void); #else #define /* no-check-names */ mbedtls_aesce_has_support() 1 diff --git a/library/aesni.c b/library/aesni.c index b6d1191794..766b6713c4 100644 --- a/library/aesni.c +++ b/library/aesni.c @@ -39,7 +39,7 @@ #include #endif -#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN) +#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) /* * AES-NI support detection routine */ @@ -69,7 +69,7 @@ int mbedtls_aesni_has_support(unsigned int what) return (c & what) != 0; } -#endif /* !MBEDTLS_AES_HAS_NO_BUILTIN */ +#endif /* !MBEDTLS_AES_HAS_NO_PLAIN_C */ #if MBEDTLS_AESNI_HAVE_CODE == 2 diff --git a/library/aesni.h b/library/aesni.h index fa1f369edd..341350a1ee 100644 --- a/library/aesni.h +++ b/library/aesni.h @@ -88,7 +88,7 @@ extern "C" { * * \return 1 if CPU has support for the feature, 0 otherwise */ -#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN) +#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) int mbedtls_aesni_has_support(unsigned int what); #else #define /* no-check-names */ mbedtls_aesni_has_support(what) 1 diff --git a/library/padlock.c b/library/padlock.c index 111b28cf86..eeb6368fa7 100644 --- a/library/padlock.c +++ b/library/padlock.c @@ -33,7 +33,7 @@ #if defined(MBEDTLS_HAVE_X86) -#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN) +#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) /* * PadLock detection routine */ diff --git a/library/padlock.h b/library/padlock.h index 10c1c69946..7ec960d7a9 100644 --- a/library/padlock.h +++ b/library/padlock.h @@ -68,7 +68,7 @@ extern "C" { * * \return non-zero if CPU has support for the feature, 0 otherwise */ -#if !defined(MBEDTLS_AES_HAS_NO_BUILTIN) +#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C) int mbedtls_padlock_has_support(int feature); #else #define /* no-check-names */ mbedtls_padlock_has_support(feature) 1 diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 8dd6b8cec0..20ced44d41 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -4946,7 +4946,7 @@ component_test_aes_builtin_only () { scripts/config.py unset MBEDTLS_AESNI_C scripts/config.py unset MBEDTLS_PADLOCK_C scripts/config.py unset MBEDTLS_AESCE_C - scripts/config.py unset MBEDTLS_AES_HAS_NO_BUILTIN + scripts/config.py unset MBEDTLS_AES_HAS_NO_PLAIN_C msg "build: make, AES built-in only" # ~10s make @@ -4959,7 +4959,7 @@ component_test_aes_aesni_only () { scripts/config.py set MBEDTLS_AESNI_C scripts/config.py unset MBEDTLS_PADLOCK_C scripts/config.py unset MBEDTLS_AESCE_C - scripts/config.py set MBEDTLS_AES_HAS_NO_BUILTIN + scripts/config.py set MBEDTLS_AES_HAS_NO_PLAIN_C msg "build: AESNI only" # ~10s make @@ -4972,7 +4972,7 @@ component_test_aes_padlock_only () { scripts/config.py unset MBEDTLS_AESNI_C scripts/config.py set MBEDTLS_PADLOCK_C scripts/config.py unset MBEDTLS_AESCE_C - scripts/config.py set MBEDTLS_AES_HAS_NO_BUILTIN + scripts/config.py set MBEDTLS_AES_HAS_NO_PLAIN_C msg "build: AES, VIA padlock only" # ~10s make CC=gcc CFLAGS="$ASAN_CFLAGS -m32 -O2" LDFLAGS="-m32 $ASAN_CFLAGS"