Skip to content

Commit 3325070

Browse files
author
Cruz Monrreal
authored
Merge pull request #8936 from RonEld/reduce_default_mpi_max_size
Reduce default MBEDTLS_MPI_MAX_SIZE
2 parents b32151b + edc09cf commit 3325070

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

features/mbedtls/importer/adjust-config.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ conf unset MBEDTLS_SSL_TRUNCATED_HMAC
140140

141141
conf unset MBEDTLS_PLATFORM_TIME_TYPE_MACRO
142142

143+
# The default size of MBEDTLS_MPI_MAX_SIZE is 1024 bytes.
144+
# In some cases, this value is set to stack buffers.
145+
# Reduce the maximal MBEDTLS_MPI_MAX_SIZE to 512 bytes,
146+
# which should fit RSA 4096 bit keys.
147+
conf set MBEDTLS_MPI_MAX_SIZE 512
148+
143149
# The following configurations are a needed for Mbed Crypto submodule.
144150
# They are related to the persistent key storage feature.
145151
conf set MBEDTLS_PSA_CRYPTO_STORAGE_C

0 commit comments

Comments
 (0)