@@ -188,12 +188,12 @@ static int _wait_response_with_crypttimeout(whClientContext *ctx,
188188 int ret = WH_ERROR_OK ;
189189 do {
190190 ret = wh_Client_RecvResponse (ctx , out_group , out_action , out_size , data );
191- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
191+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
192192 if (ret == WH_ERROR_NOTREADY ) {
193193 /* Check for crypto timeout */
194- int chk = wh_CommClient_CheckTimeout (ctx -> comm );
195- if (chk == WH_ERROR_CRYPTIMEOUT ) {
196- return WH_ERROR_CRYPTIMEOUT ;
194+ int chk = wh_Client_CheckTimeout (ctx );
195+ if (chk == WH_ERROR_TIMEOUT ) {
196+ return WH_ERROR_TIMEOUT ;
197197 } else if (chk < 0 && chk != WH_ERROR_OK ) {
198198 return chk ;
199199 }
@@ -253,9 +253,9 @@ int wh_Client_RngGenerate(whClientContext* ctx, uint8_t* out, uint32_t size)
253253
254254 /* Send request and get response */
255255 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
256- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
256+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
257257 if (ret == WH_ERROR_OK ) {
258- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
258+ ret = wh_Client_InitCryptTimeout (ctx );
259259 }
260260#endif
261261 if (ret == 0 ) {
@@ -436,9 +436,9 @@ int wh_Client_AesCtr(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
436436 WH_DEBUG_VERBOSE_HEXDUMP ("[client] tmp: \n" , req_tmp , AES_BLOCK_SIZE );
437437 WH_DEBUG_VERBOSE_HEXDUMP ("[client] req packet: \n" , (uint8_t * )req , req_len );
438438 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
439- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
439+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
440440 if (ret == WH_ERROR_OK ) {
441- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
441+ ret = wh_Client_InitCryptTimeout (ctx );
442442 }
443443#endif
444444 /* read response */
@@ -555,9 +555,9 @@ int wh_Client_AesEcb(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
555555 WH_DEBUG_VERBOSE_HEXDUMP ("[client] iv: \n" , req_iv , iv_len );
556556 WH_DEBUG_VERBOSE_HEXDUMP ("[client] req packet: \n" , (uint8_t * )req , req_len );
557557 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
558- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
558+ #if defined(WOLFHSM_CFG_ENABLE_CWOLFHSM_CFG_CLIENT_TIMEOUTLIENT_TIMEOUT )
559559 if (ret == WH_ERROR_OK ) {
560- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
560+ ret = wh_Client_InitCryptTimeout (ctx );
561561 }
562562#endif
563563 /* read response */
@@ -671,9 +671,9 @@ int wh_Client_AesCbc(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
671671 WH_DEBUG_VERBOSE_HEXDUMP ("[client] iv: \n" , req_iv , iv_len );
672672 WH_DEBUG_VERBOSE_HEXDUMP ("[client] req packet: \n" , (uint8_t * )req , req_len );
673673 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
674- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
674+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
675675 if (ret == WH_ERROR_OK ) {
676- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
676+ ret = wh_Client_InitCryptTimeout (ctx );
677677 }
678678#endif
679679 /* read response */
@@ -801,9 +801,9 @@ int wh_Client_AesGcm(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
801801
802802 /* Send request and receive response */
803803 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
804- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
804+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
805805 if (ret == WH_ERROR_OK ) {
806- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
806+ ret = wh_Client_InitCryptTimeout (ctx );
807807 }
808808#endif
809809 if (ret == 0 ) {
@@ -1007,9 +1007,9 @@ int wh_Client_AesGcmDma(whClientContext* ctx, Aes* aes, int enc,
10071007 if (ret == WH_ERROR_OK ) {
10081008 ret = wh_Client_SendRequest (ctx , group , action , reqLen , dataPtr );
10091009 }
1010- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
1010+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
10111011 if (ret == WH_ERROR_OK ) {
1012- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
1012+ ret = wh_Client_InitCryptTimeout (ctx );
10131013 }
10141014#endif
10151015 if (ret == 0 ) {
0 commit comments