Skip to content

Commit 4a8e2de

Browse files
author
Cruz Monrreal
authored
Merge pull request #9005 from yanesca/fix-mbedtls-ecc-hardware-double-init
Mbed TLS: Fix ECC hardware double initialization
2 parents fce4dc6 + 71387e3 commit 4a8e2de

File tree

1 file changed

+6
-5
lines changed
  • features/mbedtls/src

1 file changed

+6
-5
lines changed

features/mbedtls/src/ecp.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,11 +2393,6 @@ int mbedtls_ecp_muladd_restartable(
23932393

23942394
mbedtls_ecp_point_init( &mP );
23952395

2396-
#if defined(MBEDTLS_ECP_INTERNAL_ALT)
2397-
if( ( is_grp_capable = mbedtls_internal_ecp_grp_capable( grp ) ) )
2398-
MBEDTLS_MPI_CHK( mbedtls_internal_ecp_init( grp ) );
2399-
#endif /* MBEDTLS_ECP_INTERNAL_ALT */
2400-
24012396
ECP_RS_ENTER( ma );
24022397

24032398
#if defined(MBEDTLS_ECP_RESTARTABLE)
@@ -2425,6 +2420,12 @@ int mbedtls_ecp_muladd_restartable(
24252420
mul2:
24262421
#endif
24272422
MBEDTLS_MPI_CHK( mbedtls_ecp_mul_shortcuts( grp, pR, n, Q, rs_ctx ) );
2423+
2424+
#if defined(MBEDTLS_ECP_INTERNAL_ALT)
2425+
if( ( is_grp_capable = mbedtls_internal_ecp_grp_capable( grp ) ) )
2426+
MBEDTLS_MPI_CHK( mbedtls_internal_ecp_init( grp ) );
2427+
#endif /* MBEDTLS_ECP_INTERNAL_ALT */
2428+
24282429
#if defined(MBEDTLS_ECP_RESTARTABLE)
24292430
if( rs_ctx != NULL && rs_ctx->ma != NULL )
24302431
rs_ctx->ma->state = ecp_rsma_add;

0 commit comments

Comments
 (0)