Skip to content

Commit

Permalink
Make mbedtls_ecdsa_can_do definition unconditional
Browse files Browse the repository at this point in the history
Signed-off-by: JonathanWitthoeft <[email protected]>
  • Loading branch information
JonathanWitthoeft authored and gilles-peskine-arm committed Sep 29, 2023
1 parent bfb0b39 commit 930679a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.d/mbedtls_ecdsa_can_do-unconditional-define.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bugfix
* Removes !ECDSA_SIGN_ALT condition around mbedtls_ecdsa_can_do
definition, so that mbedtls_ecdsa_verify_restartable will not
automatically fail.
5 changes: 0 additions & 5 deletions library/ecdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ static int derive_mpi(const mbedtls_ecp_group *grp, mbedtls_mpi *x,
}
#endif /* ECDSA_DETERMINISTIC || !ECDSA_SIGN_ALT || !ECDSA_VERIFY_ALT */

#if !defined(MBEDTLS_ECDSA_SIGN_ALT) || \
!defined(MBEDTLS_ECDSA_VERIFY_ALT)

int mbedtls_ecdsa_can_do(mbedtls_ecp_group_id gid)
{
switch (gid) {
Expand All @@ -256,8 +253,6 @@ int mbedtls_ecdsa_can_do(mbedtls_ecp_group_id gid)
}
}

#endif /* !ECDSA_SIGN_ALT || !ECDSA_VERIFY_ALT */

#if !defined(MBEDTLS_ECDSA_SIGN_ALT)
/*
* Compute ECDSA signature of a hashed message (SEC1 4.1.3)
Expand Down

0 comments on commit 930679a

Please sign in to comment.