Skip to content

Commit

Permalink
modules: mbedtls: remove default-enabling of hash algorithms
Browse files Browse the repository at this point in the history
Do not enable hash algorithms by default.
This unnecessarily inflates the final code size even if not all the
enabled hash algorithms are actually used.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
  • Loading branch information
tomi-font committed Apr 29, 2024
1 parent 1542140 commit 6e530fd
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions modules/mbedtls/Kconfig.tls-generic
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,13 @@ config MBEDTLS_HASH_ALL_ENABLED

config MBEDTLS_HASH_SHA256_ENABLED
bool "SHA256 hash"
default y if !NET_L2_OPENTHREAD

config MBEDTLS_HASH_SHA384_ENABLED
bool "SHA384 hash"
default y if !NET_L2_OPENTHREAD
select MBEDTLS_HASH_SHA512_ENABLED

config MBEDTLS_HASH_SHA512_ENABLED
bool "SHA512 hash"
default y if !NET_L2_OPENTHREAD

comment "Supported cipher modes"

Expand Down Expand Up @@ -320,15 +317,12 @@ config MBEDTLS_MAC_MD4_ENABLED

config MBEDTLS_MAC_MD5_ENABLED
bool "MD5 hash algorithm"
default y if !NET_L2_OPENTHREAD

config MBEDTLS_MAC_SHA1_ENABLED
bool "SHA1 hash algorithm"
default y if !NET_L2_OPENTHREAD

config MBEDTLS_MAC_SHA256_ENABLED
bool "SHA-224 and SHA-256 hash algorithms"
default y

config MBEDTLS_SHA256_SMALLER
bool "Smaller SHA-256 implementation"
Expand Down

0 comments on commit 6e530fd

Please sign in to comment.