Address PR cpomments reviews
1) move the change into Features from Changes, in the changLog
2) Change the feature alternative configuration MBEDTLS_ECDH_ALT
definition to function alternative defintions
MBEDTLS_ECDH_COMPUTE_SHARED_ALT and MBEDTLS_ECDH_GEN_PUBLIC_ALT
diff --git a/library/ecdh.c b/library/ecdh.c
index b66cb58..61380b6 100644
--- a/library/ecdh.c
+++ b/library/ecdh.c
@@ -38,7 +38,7 @@
#include <string.h>
-#if !defined(MBEDTLS_ECDH_ALT)
+#if !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
/*
* Generate public key: simple wrapper around mbedtls_ecp_gen_keypair
*/
@@ -48,7 +48,9 @@
{
return mbedtls_ecp_gen_keypair( grp, d, Q, f_rng, p_rng );
}
+#endif /* MBEDTLS_ECDH_GEN_PUBLIC_ALT */
+#if !defined(MBEDTLS_ECDH_COMPUTE_SHARED_ALT)
/*
* Compute shared secret (SEC1 3.3.1)
*/
@@ -82,7 +84,8 @@
return( ret );
}
-#endif /* MBEDTLS_ECDH_ALT */
+#endif /* MBEDTLS_ECDH_COMPUTE_SHARED_ALT */
+
/*
* Initialize context
*/