From 930679a1d7f7a2cdafd1901d43f4ca2b426737e8 Mon Sep 17 00:00:00 2001 From: JonathanWitthoeft Date: Wed, 26 Apr 2023 16:06:42 -0500 Subject: [PATCH] Make mbedtls_ecdsa_can_do definition unconditional Signed-off-by: JonathanWitthoeft --- ChangeLog.d/mbedtls_ecdsa_can_do-unconditional-define.txt | 4 ++++ library/ecdsa.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 ChangeLog.d/mbedtls_ecdsa_can_do-unconditional-define.txt diff --git a/ChangeLog.d/mbedtls_ecdsa_can_do-unconditional-define.txt b/ChangeLog.d/mbedtls_ecdsa_can_do-unconditional-define.txt new file mode 100644 index 0000000000..fe420ac05a --- /dev/null +++ b/ChangeLog.d/mbedtls_ecdsa_can_do-unconditional-define.txt @@ -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. diff --git a/library/ecdsa.c b/library/ecdsa.c index 5cfed082ab..2fcb2fbc01 100644 --- a/library/ecdsa.c +++ b/library/ecdsa.c @@ -240,9 +240,6 @@ cleanup: } #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) { @@ -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)