Minor fixes for build errors and bad macro names.

This commit is contained in:
David Garske 2021-02-18 10:55:47 -08:00
parent c62b48f7d0
commit 10be54054e
5 changed files with 14 additions and 10 deletions

View File

@ -54,7 +54,7 @@
#define USE_FAST_MATH
#define WC_NO_ASYNC_THREADING
#define HAVE_DH_DEFAULT_PARAMS
#define NO_DES
#define NO_DES3
#define WOLFSSL_DH_CONST
/* MQX */

View File

@ -534,9 +534,9 @@
#endif
#if (SSL_CFG_3DES_EN == DEF_ENABLED)
#undef NO_DES
#undef NO_DES3
#else
#define NO_DES
#define NO_DES3
#endif
#if (SSL_CFG_AES_EN == DEF_ENABLED)

View File

@ -728,6 +728,9 @@ static const char* bench_desc_words[][9] = {
|| defined(HAVE_CURVE448) || defined(HAVE_ED448)
#define HAVE_LOCAL_RNG
static THREAD_LS_T WC_RNG gRng;
#define GLOBAL_RNG &gRng
#else
#define GLOBAL_RNG NULL
#endif
#if defined(HAVE_ED25519) || defined(HAVE_CURVE25519) || \
@ -4619,7 +4622,7 @@ static void bench_rsa_helper(int doAsync, RsaKey rsaKey[BENCH_MAX_PENDING],
1, &times, ntimes, &pending)) {
ret = wc_RsaPublicEncrypt(message, (word32)len, enc[i],
rsaKeySz/8, &rsaKey[i],
&gRng);
GLOBAL_RNG);
if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(
&rsaKey[i]), 1, &times, &pending)) {
goto exit_rsa_verify;
@ -4702,7 +4705,6 @@ exit_rsa_sign:
}
#endif /* !WOLFSSL_RSA_PUBLIC_ONLY && !WOLFSSL_RSA_VERIFY_ONLY */
#ifndef WOLFSSL_RSA_VERIFY_ONLY
/* capture resulting encrypt length */
idx = rsaKeySz/8;
@ -4750,7 +4752,6 @@ exit_rsa_sign:
exit_rsa_verifyinline:
bench_stats_asym_finish("RSA", rsaKeySz, desc[5], doAsync, count,
start, ret);
#endif /* !WOLFSSL_RSA_VERIFY_ONLY */
}
exit:
@ -4844,6 +4845,9 @@ void bench_rsa(int doAsync)
bench_rsa_helper(doAsync, rsaKey, rsaKeySz);
}
(void)bytes;
(void)tmp;
exit_bench_rsa:
/* cleanup */
for (i = 0; i < BENCH_MAX_PENDING; i++) {

View File

@ -26,7 +26,7 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifndef NO_DES
#ifndef NO_DES3
#if defined(WOLFSSL_TI_CRYPT)
#include <stdbool.h>
@ -201,4 +201,4 @@ WOLFSSL_API void wc_Des3Free(Des3* des)
#endif /* WOLFSSL_TI_CRYPT */
#endif /* NO_DES */
#endif /* !NO_DES3 */

View File

@ -6253,7 +6253,7 @@ WOLFSSL_TEST_SUBROUTINE int des_test(void)
return 0;
}
#endif /* NO_DES3 */
#endif /* !NO_DES3 */
#ifndef NO_DES3
@ -6375,7 +6375,7 @@ WOLFSSL_TEST_SUBROUTINE int des3_test(void)
return 0;
}
#endif /* NO_DES */
#endif /* NO_DES3 */
#ifndef NO_AES