mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-02-19 00:39:46 +00:00
Move ops count to top-level context
When a restartable function calls another restartable function, the current ops_count needs to be shared to avoid either doing too many operations or returning IN_PROGRESS uselessly. So it needs to be in the top-level context rather than a specific sub-context.
This commit is contained in:
@@ -184,7 +184,8 @@ typedef struct mbedtls_ecp_restart_mul mbedtls_ecp_restart_mul_ctx;
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
mbedtls_ecp_restart_mul_ctx *rsm; /*!< restart context for ecp_mul() */
|
||||
unsigned ops_done; /*!< current ops count */
|
||||
mbedtls_ecp_restart_mul_ctx *rsm; /*!< ecp_mul_comb() sub-context */
|
||||
} mbedtls_ecp_restart_ctx;
|
||||
#endif /* MBEDTLS_ECP_EARLY_RETURN */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user