From 1559d66261c33fd8b9f779c91b506ebc2918fcca Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 23 Jul 2020 15:41:09 -0700 Subject: [PATCH] Fix for `WC_ECC_NONBLOCK_ONLY` case to also check `WC_ECC_NONBLOCK`. --- wolfcrypt/src/ecc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 11b9dffea..8af793f55 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -4913,7 +4913,7 @@ int wc_ecc_sign_hash_ex(const byte* in, word32 inlen, WC_RNG* rng, #else mp_int* sign_k = NULL; #endif - #ifdef WC_ECC_NONBLOCK_ONLY + #if defined(WC_ECC_NONBLOCK) && defined(WC_ECC_NONBLOCK_ONLY) /* perform blocking call to non-blocking function */ ecc_nb_ctx_t nb_ctx; XMEMSET(&nb_ctx, 0, sizeof(nb_ctx)); @@ -6028,7 +6028,7 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash, && key->asyncDev.marker != WOLFSSL_ASYNC_MARKER_ECC #endif ) { - #ifdef WC_ECC_NONBLOCK_ONLY + #if defined(WC_ECC_NONBLOCK) && defined(WC_ECC_NONBLOCK_ONLY) /* perform blocking call to non-blocking function */ ecc_nb_ctx_t nb_ctx; XMEMSET(&nb_ctx, 0, sizeof(nb_ctx));