ECDH: Fix error code in mbedtls_ecdsa_sign
@@ -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 )
