From fba94e97264d33e896dcac80b963579e7f2c3be9 Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Thu, 6 Dec 2018 17:18:24 +0000 Subject: [PATCH] ECDH: Fix error code in mbedtls_ecdsa_sign --- library/ecdsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 library/ecdsa.c diff --git a/library/ecdsa.c b/library/ecdsa.c old mode 100644 new mode 100755 index 6411a5e19..2daabeedf --- a/library/ecdsa.c +++ b/library/ecdsa.c @@ -266,7 +266,7 @@ static int ecdsa_sign_restartable( mbedtls_ecp_group *grp, if( grp->id == MBEDTLS_ECP_DP_CURVE25519 || grp->id == MBEDTLS_ECP_DP_CURVE448 || grp->N.p == NULL ) - return( MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE ); + return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); /* Make sure d is in range 1..n-1 */ if( mbedtls_mpi_cmp_int( d, 1 ) < 0 || mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 )