Skip to content

Commit

Permalink
Merge "chore(config): correct build config MBEDTLS_ECP_MAX_OPS name" …
Browse files Browse the repository at this point in the history
…into integration
  • Loading branch information
soby-mathew authored and TrustedFirmware Code Review committed Mar 16, 2023
2 parents 5e994c4 + f725cc0 commit 96bda16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/attestation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
add_library(rmm-lib-attestation)

arm_config_option(
NAME ECP_MAX_OPS
NAME MBEDTLS_ECP_MAX_OPS
HELP "Set the number of max operations per ECC signing iteration (min: 248)"
TYPE STRING
DEFAULT 1000
ADVANCED)

if(ECP_MAX_OPS LESS 248)
if(MBEDTLS_ECP_MAX_OPS LESS 248)
message(FATAL_ERROR "ECP_MAX_OPS is less than the lowest effective
value for curve and MBEDTLS_ECP_WINDOW_SIZE")
endif()

target_compile_definitions(rmm-lib-attestation
PRIVATE "ECP_MAX_OPS=${ECP_MAX_OPS}U")
PRIVATE "MBEDTLS_ECP_MAX_OPS=${MBEDTLS_ECP_MAX_OPS}U")

target_link_libraries(rmm-lib-attestation
PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion lib/attestation/src/attestation_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int attestation_init(void)
*
* This adjusts the length of a single signing loop.
*/
FPU_ALLOW(mbedtls_ecp_set_max_ops(ECP_MAX_OPS));
FPU_ALLOW(mbedtls_ecp_set_max_ops(MBEDTLS_ECP_MAX_OPS));

FPU_ALLOW(ret = attest_rnd_prng_init());
if (ret != 0) {
Expand Down

0 comments on commit 96bda16

Please sign in to comment.