Remove MBEDTLS_ECDSA_VERIFY_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
diff --git a/tf-psa-crypto/drivers/builtin/src/ecdsa.c b/tf-psa-crypto/drivers/builtin/src/ecdsa.c
index 2f7a996..da4c9e8 100644
--- a/tf-psa-crypto/drivers/builtin/src/ecdsa.c
+++ b/tf-psa-crypto/drivers/builtin/src/ecdsa.c
@@ -194,8 +194,7 @@
#endif /* MBEDTLS_ECP_RESTARTABLE */
#if defined(MBEDTLS_ECDSA_DETERMINISTIC) || \
- !defined(MBEDTLS_ECDSA_SIGN_ALT) || \
- !defined(MBEDTLS_ECDSA_VERIFY_ALT)
+ !defined(MBEDTLS_ECDSA_SIGN_ALT)
/*
* 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
@@ -220,7 +219,7 @@
cleanup:
return ret;
}
-#endif /* ECDSA_DETERMINISTIC || !ECDSA_SIGN_ALT || !ECDSA_VERIFY_ALT */
+#endif /* ECDSA_DETERMINISTIC || !ECDSA_SIGN_ALT */
int mbedtls_ecdsa_can_do(mbedtls_ecp_group_id gid)
{
@@ -480,7 +479,6 @@
}
#endif /* MBEDTLS_ECDSA_DETERMINISTIC */
-#if !defined(MBEDTLS_ECDSA_VERIFY_ALT)
/*
* Verify ECDSA signature of hashed message (SEC1 4.1.4)
* Obviously, compared to SEC1 4.1.3, we skip step 2 (hash message)
@@ -601,7 +599,6 @@
{
return mbedtls_ecdsa_verify_restartable(grp, buf, blen, Q, r, s, NULL);
}
-#endif /* !MBEDTLS_ECDSA_VERIFY_ALT */
/*
* Convert a signature (given by context) to ASN.1
@@ -741,19 +738,11 @@
ret += MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
goto cleanup;
}
-#if defined(MBEDTLS_ECDSA_VERIFY_ALT)
- (void) rs_ctx;
- if ((ret = mbedtls_ecdsa_verify(&ctx->grp, hash, hlen,
- &ctx->Q, &r, &s)) != 0) {
- goto cleanup;
- }
-#else
if ((ret = mbedtls_ecdsa_verify_restartable(&ctx->grp, hash, hlen,
&ctx->Q, &r, &s, rs_ctx)) != 0) {
goto cleanup;
}
-#endif /* MBEDTLS_ECDSA_VERIFY_ALT */
/* At this point we know that the buffer starts with a valid signature.
* Return 0 if the buffer just contains the signature, and a specific