diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index 3bacf5cab..448549cfc 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -399,7 +399,7 @@ void mbedtls_ecp_set_max_ops( unsigned max_ops ); * \return \c 0 if \c max_ops == 0 (restart disabled) * \return \c 1 otherwise (restart enabled) */ -int mbedtls_ecp_restart_enabled( void ); +int mbedtls_ecp_restart_is_enabled( void ); #endif /* MBEDTLS_ECP_RESTARTABLE */ /** diff --git a/library/ecdsa.c b/library/ecdsa.c index 9e35da1f7..abac015ce 100644 --- a/library/ecdsa.c +++ b/library/ecdsa.c @@ -177,7 +177,7 @@ static void ecdsa_restart_det_free( mbedtls_ecdsa_restart_det_ctx *ctx ) rs_ctx->ecp.ops_done = 0; \ \ /* set up our own sub-context if needed */ \ - if( mbedtls_ecp_restart_enabled() && \ + if( mbedtls_ecp_restart_is_enabled() && \ rs_ctx != NULL && rs_ctx->SUB == NULL ) \ { \ rs_ctx->SUB = mbedtls_calloc( 1, sizeof( *rs_ctx->SUB ) ); \ diff --git a/library/ecp.c b/library/ecp.c index 94b42b97c..df85ca4a5 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -106,7 +106,7 @@ void mbedtls_ecp_set_max_ops( unsigned max_ops ) /* * Check if restart is enabled */ -int mbedtls_ecp_restart_enabled( void ) +int mbedtls_ecp_restart_is_enabled( void ) { return( ecp_max_ops != 0 ); } @@ -266,7 +266,7 @@ int mbedtls_ecp_check_budget( const mbedtls_ecp_group *grp, rs_ctx->ops_done = 0; \ \ /* set up our own sub-context if needed */ \ - if( mbedtls_ecp_restart_enabled() && \ + if( mbedtls_ecp_restart_is_enabled() && \ rs_ctx != NULL && rs_ctx->SUB == NULL ) \ { \ rs_ctx->SUB = mbedtls_calloc( 1, sizeof( *rs_ctx->SUB ) ); \ diff --git a/library/pk.c b/library/pk.c index ce8dbb5bb..e0e8dbad2 100644 --- a/library/pk.c +++ b/library/pk.c @@ -239,7 +239,7 @@ int mbedtls_pk_verify_restartable( mbedtls_pk_context *ctx, #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) /* optimization: use non-restartable version if restart disabled */ if( rs_ctx != NULL && - mbedtls_ecp_restart_enabled() && + mbedtls_ecp_restart_is_enabled() && ctx->pk_info->verify_rs_func != NULL ) { int ret; @@ -352,7 +352,7 @@ int mbedtls_pk_sign_restartable( mbedtls_pk_context *ctx, #if defined(MBEDTLS_ECDSA_C) && defined(MBEDTLS_ECP_RESTARTABLE) /* optimization: use non-restartable version if restart disabled */ if( rs_ctx != NULL && - mbedtls_ecp_restart_enabled() && + mbedtls_ecp_restart_is_enabled() && ctx->pk_info->sign_rs_func != NULL ) { int ret;