From 704b4f703824122186598abc424ed709ebb0a091 Mon Sep 17 00:00:00 2001 From: Brett Nicholas <7547222+bigbrett@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:24:47 -0600 Subject: [PATCH] gate usage of cryptoCb cipher type on NO_AES, per wolfCrypt definition --- src/wh_client_cryptocb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wh_client_cryptocb.c b/src/wh_client_cryptocb.c index 742fcfa2..65bd2d1f 100644 --- a/src/wh_client_cryptocb.c +++ b/src/wh_client_cryptocb.c @@ -98,6 +98,7 @@ int wh_Client_CryptoCb(int devId, wc_CryptoInfo* info, void* inCtx) /* Based on the info type, process the request */ switch (info->algo_type) { +#ifndef NO_AES case WC_ALGO_TYPE_CIPHER: /* Set shared cipher request members */ packet->cipherAnyReq.type = info->cipher.type; @@ -105,7 +106,6 @@ int wh_Client_CryptoCb(int devId, wc_CryptoInfo* info, void* inCtx) switch (info->cipher.type) { -#ifndef NO_AES #ifdef HAVE_AES_CBC case WC_CIPHER_AES_CBC: { @@ -288,13 +288,13 @@ int wh_Client_CryptoCb(int devId, wc_CryptoInfo* info, void* inCtx) } } break; #endif /* HAVE_AESGCM */ -#endif /* !NO_AES */ default: ret = CRYPTOCB_UNAVAILABLE; break; } break; +#endif /* !NO_AES */ case WC_ALGO_TYPE_PK: /* set type */