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.
diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
index c594b69..950319a 100644
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
@@ -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
diff --git a/library/ecdh.c b/library/ecdh.c
index b7e25dc..307ee1f 100644
--- a/library/ecdh.c
+++ b/library/ecdh.c
@@ -191,14 +191,14 @@
{
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