Skip to content

Commit

Permalink
gate usage of cryptoCb cipher type on NO_AES, per wolfCrypt definition
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbrett committed Aug 13, 2024
1 parent b1218c0 commit 704b4f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wh_client_cryptocb.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ 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;
packet->cipherAnyReq.enc = info->cipher.enc;

switch (info->cipher.type)
{
#ifndef NO_AES
#ifdef HAVE_AES_CBC
case WC_CIPHER_AES_CBC:
{
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 704b4f7

Please sign in to comment.