mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 08:14:27 +01:00
Some style and documentation fixes
1. Change description of of hte `MBEDTLS_ECP_RESTARTABLE` in the configuration file. 2. Change check for compilation of `rs_ctx` to positive flow.
This commit is contained in:
parent
5ed8c1eded
commit
19779c4739
@ -695,8 +695,9 @@
|
||||
*
|
||||
* Uncomment this macro to enable restartable ECC computations.
|
||||
*
|
||||
* \note MBEDTLS_ECP_RESTARTABLE cannot be defined if there is an alternative
|
||||
* implementation for one of the ECP, ECDSA or ECDH functions. *
|
||||
* \note This option only works with the default software implementation of
|
||||
* elliptic curve functionality. It is incompatible with
|
||||
* MBEDTLS_ECP_ALT, MBEDTLS_ECDH_xxx_ALT and MBEDTLS_ECDSA_xxx_ALT.
|
||||
*/
|
||||
//#define MBEDTLS_ECP_RESTARTABLE
|
||||
|
||||
|
@ -191,14 +191,14 @@ int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen,
|
||||
{
|
||||
int ret;
|
||||
size_t grp_len, pt_len;
|
||||
#if !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
mbedtls_ecp_restart_ctx *rs_ctx = NULL;
|
||||
#endif
|
||||
|
||||
if( ctx == NULL || ctx->grp.pbits == 0 )
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE) && !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
if( ctx->restart_enabled )
|
||||
rs_ctx = &ctx->rs;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user