From 2981a0a7402ea331b6eb74599de64d0c825c9e73 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Sun, 24 Sep 2017 15:41:09 +0300 Subject: [PATCH] Address Andres PR comments Address Andres' comments in the PR --- ChangeLog | 5 +++-- library/ecdsa.c | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9be97bd4..94eba4208 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,8 +38,9 @@ Changes by Jean-Philippe Aumasson. * Add support for alternative implementation for ECDSA, controlled by new configuration flag MBEDTLS_ECDSA_ALT in config.h. - Alternative Ecdsa is supported for implementation of `mbedtls_ecdsa_sign` - and `mbedtls_ecdsa_verify`. + The following functions from the ECDSA module can be replaced + with an alternative implementation: + mbedtls_ecdsa_sign(), mbedtls_ecdsa_verify() and mbedtls_ecdsa_genkey(). = mbed TLS 2.5.0 branch released 2017-05-17 diff --git a/library/ecdsa.c b/library/ecdsa.c index 8804ca62f..804884bca 100644 --- a/library/ecdsa.c +++ b/library/ecdsa.c @@ -37,9 +37,11 @@ #include "mbedtls/asn1write.h" #include + #if defined(MBEDTLS_ECDSA_DETERMINISTIC) #include "mbedtls/hmac_drbg.h" #endif + /* * Derive a suitable integer for group grp from a buffer of length len * SEC1 4.1.3 step 5 aka SEC1 4.1.4 step 3 @@ -314,6 +316,7 @@ static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s, return( 0 ); } + /* * Compute and write signature */