Skip to content

Commit 5151a69

Browse files
authored
Merge pull request #10373 from douzzer/20260430-ecc_test_vector_item-WC_MIN_DIGEST_SIZE
20260430-ecc_test_vector_item-WC_MIN_DIGEST_SIZE
2 parents d8797f5 + 70d5d86 commit 5151a69

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

wolfcrypt/test/test.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34832,20 +34832,22 @@ static wc_test_ret_t ecc_test_vector_item(const eccVector* vector)
3483234832
#endif /* !NO_ASN */
3483334833

3483434834
#ifdef HAVE_ECC_VERIFY
34835-
do {
34835+
if (vector->msgLen >= WC_MIN_DIGEST_SIZE) {
34836+
do {
3483634837
#if defined(WOLFSSL_ASYNC_CRYPT)
34837-
ret = wc_AsyncWait(ret, &userA->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
34838+
ret = wc_AsyncWait(ret, &userA->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
3483834839
#endif
34839-
if (ret == 0)
34840-
ret = wc_ecc_verify_hash(sig, sigSz, (byte*)vector->msg,
34841-
vector->msgLen, &verify, userA);
34842-
} while (ret == WC_NO_ERR_TRACE(WC_PENDING_E));
34843-
if (ret != 0)
34844-
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), done);
34845-
TEST_SLEEP();
34840+
if (ret == 0)
34841+
ret = wc_ecc_verify_hash(sig, sigSz, (byte*)vector->msg,
34842+
vector->msgLen, &verify, userA);
34843+
} while (ret == WC_NO_ERR_TRACE(WC_PENDING_E));
34844+
if (ret != 0)
34845+
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), done);
34846+
TEST_SLEEP();
3484634847

34847-
if (verify != 1)
34848-
ret = WC_TEST_RET_ENC_NC;
34848+
if (verify != 1)
34849+
ret = WC_TEST_RET_ENC_NC;
34850+
}
3484934851
#endif
3485034852

3485134853
done:

0 commit comments

Comments
 (0)