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 <makejian@xiaomi.com>
This commit is contained in:
makejian 2024-10-16 21:41:57 +08:00 committed by Xiang Xiao
parent 0b727d290b
commit 6588ce4840
2 changed files with 20 additions and 0 deletions

View file

@ -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()
# ############################################################################

View file

@ -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