Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sm2 benchmark build fix #7324

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions wolfcrypt/benchmark/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -5526,8 +5526,8 @@ void bench_sm4_gcm(void)

exit:

WC_FREE_VAR(bench_additional);
WC_FREE_VAR(bench_tag);
WC_FREE_VAR(bench_additional, HEAP_HINT);
WC_FREE_VAR(bench_tag, HEAP_HINT);
}
#endif

Expand Down Expand Up @@ -10829,8 +10829,7 @@ void bench_sm2(int useDeviceID)
#endif
#if !defined(NO_ASN) && defined(HAVE_ECC_SIGN)
#ifdef HAVE_ECC_VERIFY
WC_DECLARE_ARRAY(verify, int, BENCH_MAX_PENDING,
sizeof(int), HEAP_HINT);
int verify[BENCH_MAX_PENDING];
#endif
#endif
word32 x[BENCH_MAX_PENDING];
Expand Down Expand Up @@ -10967,10 +10966,10 @@ void bench_sm2(int useDeviceID)
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
&times, agreeTimes, &pending)) {
if (genKey[i].state == 0)
if (genKey[i]->state == 0)
x[i] = ECC_MAX_SIG_SIZE;
ret = wc_ecc_sm2_sign_hash(digest[i], (word32)keySize,
sig[i], x[i], &gRng, genKey[i]);
sig[i], &x[i], &gRng, genKey[i]);
if (!bench_async_handle(&ret,
BENCH_ASYNC_GET_DEV(genKey[i]), 1, &times,
&pending)) {
Expand Down Expand Up @@ -11013,10 +11012,10 @@ void bench_sm2(int useDeviceID)
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
&times, agreeTimes, &pending)) {
if (genKey[i].state == 0)
if (genKey[i]->state == 0)
verify[i] = 0;
ret = wc_ecc_sm2_verify_hash(sig[i], x[i], digest[i],
(word32)keySize, verify[i], genKey[i]);
(word32)keySize, &verify[i], genKey[i]);
if (!bench_async_handle(&ret,
BENCH_ASYNC_GET_DEV(genKey[i]), 1, &times,
&pending)) {
Expand Down