forked from wolfSSL/wolfssl
fix for benchmark build with sm2
This commit is contained in:
@ -10829,8 +10829,7 @@ void bench_sm2(int useDeviceID)
|
|||||||
#endif
|
#endif
|
||||||
#if !defined(NO_ASN) && defined(HAVE_ECC_SIGN)
|
#if !defined(NO_ASN) && defined(HAVE_ECC_SIGN)
|
||||||
#ifdef HAVE_ECC_VERIFY
|
#ifdef HAVE_ECC_VERIFY
|
||||||
WC_DECLARE_ARRAY(verify, int, BENCH_MAX_PENDING,
|
int verify[BENCH_MAX_PENDING];
|
||||||
sizeof(int), HEAP_HINT);
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
word32 x[BENCH_MAX_PENDING];
|
word32 x[BENCH_MAX_PENDING];
|
||||||
@ -10967,10 +10966,10 @@ exit_ecdhe:
|
|||||||
for (i = 0; i < BENCH_MAX_PENDING; i++) {
|
for (i = 0; i < BENCH_MAX_PENDING; i++) {
|
||||||
if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
|
if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
|
||||||
×, agreeTimes, &pending)) {
|
×, agreeTimes, &pending)) {
|
||||||
if (genKey[i].state == 0)
|
if (genKey[i]->state == 0)
|
||||||
x[i] = ECC_MAX_SIG_SIZE;
|
x[i] = ECC_MAX_SIG_SIZE;
|
||||||
ret = wc_ecc_sm2_sign_hash(digest[i], (word32)keySize,
|
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,
|
if (!bench_async_handle(&ret,
|
||||||
BENCH_ASYNC_GET_DEV(genKey[i]), 1, ×,
|
BENCH_ASYNC_GET_DEV(genKey[i]), 1, ×,
|
||||||
&pending)) {
|
&pending)) {
|
||||||
@ -11013,10 +11012,10 @@ exit_ecdsa_sign:
|
|||||||
for (i = 0; i < BENCH_MAX_PENDING; i++) {
|
for (i = 0; i < BENCH_MAX_PENDING; i++) {
|
||||||
if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
|
if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
|
||||||
×, agreeTimes, &pending)) {
|
×, agreeTimes, &pending)) {
|
||||||
if (genKey[i].state == 0)
|
if (genKey[i]->state == 0)
|
||||||
verify[i] = 0;
|
verify[i] = 0;
|
||||||
ret = wc_ecc_sm2_verify_hash(sig[i], x[i], digest[i],
|
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,
|
if (!bench_async_handle(&ret,
|
||||||
BENCH_ASYNC_GET_DEV(genKey[i]), 1, ×,
|
BENCH_ASYNC_GET_DEV(genKey[i]), 1, ×,
|
||||||
&pending)) {
|
&pending)) {
|
||||||
|
Reference in New Issue
Block a user