Skip to content

Commit 630bfa2

Browse files
author
Andres Amaya Garcia
authored
Merge pull request #11 from andresag01/remove-ecdsa-increase-stack-size
Conditionally remove ECDSA and increase stack size for benchmark
2 parents e4b3ab8 + 83dd137 commit 630bfa2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

benchmark/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@
141141
"rmpXSt07GAxnG6j9jssA95E4rc1zO0CVKG5bvjVTxwi/sT0/VVX7VsJM4uTAQg==\r\n" \
142142
"-----END RSA PRIVATE KEY-----\r\n"
143143

144+
/*
145+
* Uncomment this line to enable ECDSA benchmark.
146+
*/
147+
//#define ENABLE_ECDSA
148+
144149
/*
145150
* For heap usage estimates, we need an estimate of the overhead per allocated
146151
* block. ptmalloc2/3 (used in gnu libc for instance) uses 2 size_t per block,
@@ -728,7 +733,7 @@ static int benchmark( int argc, char *argv[] )
728733
}
729734
#endif
730735

731-
#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_SHA256_C)
736+
#if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_SHA256_C) && defined(ENABLE_ECDSA)
732737
if( todo.ecdsa )
733738
{
734739
mbedtls_ecdsa_context ecdsa;

benchmark/mbed_app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_entropy_config.h\""]
2+
"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_entropy_config.h\"", "OS_MAINSTKSIZE=2048"]
33
}

0 commit comments

Comments
 (0)