add macro guard on test case

This commit is contained in:
JacobBarthelmeh
2023-05-10 15:51:39 -07:00
parent bab35c4de2
commit 07c41c5498
2 changed files with 5 additions and 0 deletions

View File

@ -195,6 +195,7 @@ static CryptoCb* wc_CryptoCb_FindDevice(int devId, int algoType)
localDevId = CryptoCb_FindCb(devId, algoType); localDevId = CryptoCb_FindCb(devId, algoType);
} }
#endif /* WOLF_CRYPTO_CB_FIND */ #endif /* WOLF_CRYPTO_CB_FIND */
(void)algoType;
return wc_CryptoCb_GetDevice(localDevId); return wc_CryptoCb_GetDevice(localDevId);
} }

View File

@ -45192,6 +45192,7 @@ static int myCryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
} }
#ifdef WOLF_CRYPTO_CB_FIND
static int myCryptoCbFind(int currentId, int algoType) static int myCryptoCbFind(int currentId, int algoType)
{ {
/* can have algo specific overrides here /* can have algo specific overrides here
@ -45214,6 +45215,7 @@ static int myCryptoCbFind(int currentId, int algoType)
} }
return currentId; return currentId;
} }
#endif /* WOLF_CRYPTO_CB_FIND */
WOLFSSL_TEST_SUBROUTINE int cryptocb_test(void) WOLFSSL_TEST_SUBROUTINE int cryptocb_test(void)
@ -45228,7 +45230,9 @@ WOLFSSL_TEST_SUBROUTINE int cryptocb_test(void)
/* set devId to something other than INVALID_DEVID */ /* set devId to something other than INVALID_DEVID */
devId = 1; devId = 1;
ret = wc_CryptoCb_RegisterDevice(devId, myCryptoDevCb, &myCtx); ret = wc_CryptoCb_RegisterDevice(devId, myCryptoDevCb, &myCtx);
#ifdef WOLF_CRYPTO_CB_FIND
wc_CryptoCb_SetDeviceFindCb(myCryptoCbFind); wc_CryptoCb_SetDeviceFindCb(myCryptoCbFind);
#endif /* WOLF_CRYPTO_CB_FIND */
#ifndef WC_NO_RNG #ifndef WC_NO_RNG
if (ret == 0) if (ret == 0)
ret = random_test(); ret = random_test();