mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-21 15:41:00 +00:00
Rename HAS_NO_PLAIN_C to DONT_USE_SOFTWARE_CRYPTO
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
1b3ab36b55
commit
3fcf2b5053
@ -147,7 +147,7 @@ jobs:
|
|||||||
- scripts/config.py unset MBEDTLS_AESNI_C
|
- scripts/config.py unset MBEDTLS_AESNI_C
|
||||||
- scripts/config.py unset MBEDTLS_PADLOCK_C
|
- scripts/config.py unset MBEDTLS_PADLOCK_C
|
||||||
- scripts/config.py set MBEDTLS_AESCE_C
|
- scripts/config.py set MBEDTLS_AESCE_C
|
||||||
- scripts/config.py set MBEDTLS_AES_HAS_NO_PLAIN_C
|
- scripts/config.py set MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO
|
||||||
- make generated_files
|
- make generated_files
|
||||||
- make
|
- make
|
||||||
- programs/test/selftest
|
- programs/test/selftest
|
||||||
|
@ -4010,6 +4010,6 @@
|
|||||||
* Platform independent implementation for crypto algorithms.
|
* Platform independent implementation for crypto algorithms.
|
||||||
* Disable plain c implementation for AES.
|
* Disable plain c implementation for AES.
|
||||||
*/
|
*/
|
||||||
//#define MBEDTLS_AES_HAS_NO_PLAIN_C /* Uncomment to disable plain c implementation of AES */
|
//#define MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO /* Uncomment to disable plain c implementation of AES */
|
||||||
|
|
||||||
/** \} name SECTION: Module configuration options */
|
/** \} name SECTION: Module configuration options */
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
#include <sys/auxv.h>
|
#include <sys/auxv.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
/*
|
/*
|
||||||
* AES instruction support detection routine
|
* AES instruction support detection routine
|
||||||
*/
|
*/
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#if !defined(MBEDTLS_HAVE_ARM64)
|
#if !defined(MBEDTLS_HAVE_ARM64)
|
||||||
#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
|
#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
|
||||||
#define MBEDTLS_HAVE_ARM64
|
#define MBEDTLS_HAVE_ARM64
|
||||||
#if !defined(MBEDTLS_AESCE_C) && !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_AESCE_C) && !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
|
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -50,7 +50,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* \return 1 if CPU has support for the feature, 0 otherwise
|
* \return 1 if CPU has support for the feature, 0 otherwise
|
||||||
*/
|
*/
|
||||||
#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
int mbedtls_aesce_has_support(void);
|
int mbedtls_aesce_has_support(void);
|
||||||
#else
|
#else
|
||||||
#define /* no-check-names */ mbedtls_aesce_has_support() 1
|
#define /* no-check-names */ mbedtls_aesce_has_support() 1
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
/*
|
/*
|
||||||
* AES-NI support detection routine
|
* AES-NI support detection routine
|
||||||
*/
|
*/
|
||||||
@ -69,7 +69,7 @@ int mbedtls_aesni_has_support(unsigned int what)
|
|||||||
|
|
||||||
return (c & what) != 0;
|
return (c & what) != 0;
|
||||||
}
|
}
|
||||||
#endif /* !MBEDTLS_AES_HAS_NO_PLAIN_C */
|
#endif /* !MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO */
|
||||||
|
|
||||||
#if MBEDTLS_AESNI_HAVE_CODE == 2
|
#if MBEDTLS_AESNI_HAVE_CODE == 2
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
(defined(__amd64__) || defined(__x86_64__)) && \
|
(defined(__amd64__) || defined(__x86_64__)) && \
|
||||||
!defined(MBEDTLS_HAVE_X86_64)
|
!defined(MBEDTLS_HAVE_X86_64)
|
||||||
#define MBEDTLS_HAVE_X86_64
|
#define MBEDTLS_HAVE_X86_64
|
||||||
#if !defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
|
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -91,7 +91,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* \return 1 if CPU has support for the feature, 0 otherwise
|
* \return 1 if CPU has support for the feature, 0 otherwise
|
||||||
*/
|
*/
|
||||||
#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
int mbedtls_aesni_has_support(unsigned int what);
|
int mbedtls_aesni_has_support(unsigned int what);
|
||||||
#else
|
#else
|
||||||
#define /* no-check-names */ mbedtls_aesni_has_support(what) 1
|
#define /* no-check-names */ mbedtls_aesni_has_support(what) 1
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#if defined(MBEDTLS_HAVE_X86)
|
#if defined(MBEDTLS_HAVE_X86)
|
||||||
|
|
||||||
#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
/*
|
/*
|
||||||
* PadLock detection routine
|
* PadLock detection routine
|
||||||
*/
|
*/
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if !defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
|
#error "MBEDTLS_AESCE_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* \return non-zero if CPU has support for the feature, 0 otherwise
|
* \return non-zero if CPU has support for the feature, 0 otherwise
|
||||||
*/
|
*/
|
||||||
#if !defined(MBEDTLS_AES_HAS_NO_PLAIN_C)
|
#if !defined(MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO)
|
||||||
int mbedtls_padlock_has_support(int feature);
|
int mbedtls_padlock_has_support(int feature);
|
||||||
#else
|
#else
|
||||||
#define /* no-check-names */ mbedtls_padlock_has_support(feature) 1
|
#define /* no-check-names */ mbedtls_padlock_has_support(feature) 1
|
||||||
|
@ -4946,7 +4946,7 @@ component_test_aes_builtin_only () {
|
|||||||
scripts/config.py unset MBEDTLS_AESNI_C
|
scripts/config.py unset MBEDTLS_AESNI_C
|
||||||
scripts/config.py unset MBEDTLS_PADLOCK_C
|
scripts/config.py unset MBEDTLS_PADLOCK_C
|
||||||
scripts/config.py unset MBEDTLS_AESCE_C
|
scripts/config.py unset MBEDTLS_AESCE_C
|
||||||
scripts/config.py unset MBEDTLS_AES_HAS_NO_PLAIN_C
|
scripts/config.py unset MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO
|
||||||
msg "build: make, AES built-in only" # ~10s
|
msg "build: make, AES built-in only" # ~10s
|
||||||
make
|
make
|
||||||
|
|
||||||
@ -4959,7 +4959,7 @@ component_test_aes_aesni_only () {
|
|||||||
scripts/config.py set MBEDTLS_AESNI_C
|
scripts/config.py set MBEDTLS_AESNI_C
|
||||||
scripts/config.py unset MBEDTLS_PADLOCK_C
|
scripts/config.py unset MBEDTLS_PADLOCK_C
|
||||||
scripts/config.py unset MBEDTLS_AESCE_C
|
scripts/config.py unset MBEDTLS_AESCE_C
|
||||||
scripts/config.py set MBEDTLS_AES_HAS_NO_PLAIN_C
|
scripts/config.py set MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO
|
||||||
msg "build: AESNI only" # ~10s
|
msg "build: AESNI only" # ~10s
|
||||||
make
|
make
|
||||||
|
|
||||||
@ -4972,7 +4972,7 @@ component_test_aes_padlock_only () {
|
|||||||
scripts/config.py unset MBEDTLS_AESNI_C
|
scripts/config.py unset MBEDTLS_AESNI_C
|
||||||
scripts/config.py set MBEDTLS_PADLOCK_C
|
scripts/config.py set MBEDTLS_PADLOCK_C
|
||||||
scripts/config.py unset MBEDTLS_AESCE_C
|
scripts/config.py unset MBEDTLS_AESCE_C
|
||||||
scripts/config.py set MBEDTLS_AES_HAS_NO_PLAIN_C
|
scripts/config.py set MBEDTLS_AES_DONT_USE_SOFTWARE_CRYPTO
|
||||||
msg "build: AES, VIA padlock only" # ~10s
|
msg "build: AES, VIA padlock only" # ~10s
|
||||||
make CC=gcc CFLAGS="$ASAN_CFLAGS -m32 -O2" LDFLAGS="-m32 $ASAN_CFLAGS"
|
make CC=gcc CFLAGS="$ASAN_CFLAGS -m32 -O2" LDFLAGS="-m32 $ASAN_CFLAGS"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user