This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 6588ce484 apps/mbedtls: add compilation configuration
6588ce484 is described below
commit 6588ce48407acca6c6f01e53dd17b19be7c56c8e
Author: makejian <[email protected]>
AuthorDate: Wed Oct 16 21:41:57 2024 +0800
apps/mbedtls: add compilation configuration
1.Supplement cmake to compile POLY1305/RIPEMD160/Bignum algorithms
2.Add blowfish and arc4 algorithm configuration
Signed-off-by: makejian <[email protected]>
---
crypto/mbedtls/CMakeLists.txt | 12 ++++++++++++
crypto/mbedtls/Kconfig | 8 ++++++++
2 files changed, 20 insertions(+)
diff --git a/crypto/mbedtls/CMakeLists.txt b/crypto/mbedtls/CMakeLists.txt
index d48c09ca0..1506a0c0f 100644
--- a/crypto/mbedtls/CMakeLists.txt
+++ b/crypto/mbedtls/CMakeLists.txt
@@ -90,6 +90,14 @@ if(CONFIG_CRYPTO_MBEDTLS)
list(APPEND CSRCS ${CMAKE_CURRENT_LIST_DIR}/source/md5_alt.c)
endif()
+ if(CONFIG_MBEDTLS_POLY1305_ALT)
+ list(APPEND CSRCS ${CMAKE_CURRENT_LIST_DIR}/source/poly1305_alt.c)
+ endif()
+
+ if(CONFIG_MBEDTLS_RIPEMD160_ALT)
+ list(APPEND CSRCS ${CMAKE_CURRENT_LIST_DIR}/source/ripemd160_alt.c)
+ endif()
+
if(CONFIG_MBEDTLS_SHA1_ALT)
list(APPEND CSRCS ${CMAKE_CURRENT_LIST_DIR}/source/sha1_alt.c)
endif()
@@ -102,6 +110,10 @@ if(CONFIG_CRYPTO_MBEDTLS)
list(APPEND CSRCS ${CMAKE_CURRENT_LIST_DIR}/source/sha512_alt.c)
endif()
+ if(CONFIG_MBEDTLS_BIGNUM_ALT)
+ list(APPEND CSRCS ${CMAKE_CURRENT_LIST_DIR}/source/bignum_alt.c)
+ endif()
+
endif()
#
############################################################################
diff --git a/crypto/mbedtls/Kconfig b/crypto/mbedtls/Kconfig
index 8a040ca93..2a5d5d53c 100644
--- a/crypto/mbedtls/Kconfig
+++ b/crypto/mbedtls/Kconfig
@@ -72,6 +72,10 @@ config MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
depends on MBEDTLS_SSL_DTLS_HELLO_VERIFY
default y
+config MBEDTLS_BLOWFISH_C
+ bool "Enable the Blowfish block cipher."
+ default n
+
config MBEDTLS_CAMELLIA_C
bool "Enable the Camellia block cipher."
default y
@@ -403,6 +407,10 @@ config MBEDTLS_AESCE_C
depends on MBEDTLS_HAVE_ASM
default y
+config MBEDTLS_ARC4_C
+ bool "Enable the ARCFOUR stream cipher."
+ default n
+
config MBEDTLS_ARIA_C
bool "Enable the ARIA block cipher."
default y