Skip to content

Commit 3ddf854

Browse files
authored
Merge pull request #18 from ARMmbed/fix_stack_overflow
Adjust size-speed trade-offs to save stack space
2 parents 03c2466 + b4d6e80 commit 3ddf854

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tls-client/mbedtls_entropy_config.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,13 @@
3434
#endif /* !MBEDTLS_ENTROPY_HARDWARE_ALT && !MBEDTLS_ENTROPY_NV_SEED */
3535

3636
#define MBEDTLS_SHA1_C
37-
#define MBEDTLS_MPI_WINDOW_SIZE 1
37+
38+
/*
39+
* This value is sufficient for handling 2048 bit RSA keys.
40+
*
41+
* Set this value higher to enable handling larger keys, but be aware that this
42+
* will increase the stack usage.
43+
*/
44+
#define MBEDTLS_MPI_MAX_SIZE 256
45+
46+
#define MBEDTLS_MPI_WINDOW_SIZE 1

0 commit comments

Comments
 (0)