@@ -187,12 +187,12 @@ static int _wait_response_with_crypttimeout(whClientContext *ctx,
187187 int ret = WH_ERROR_OK ;
188188 do {
189189 ret = wh_Client_RecvResponse (ctx , out_group , out_action , out_size , data );
190- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
190+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
191191 if (ret == WH_ERROR_NOTREADY ) {
192192 /* Check for crypto timeout */
193- int chk = wh_CommClient_CheckTimeout (ctx -> comm );
194- if (chk == WH_ERROR_CRYPTIMEOUT ) {
195- return WH_ERROR_CRYPTIMEOUT ;
193+ int chk = wh_Client_CheckTimeout (ctx );
194+ if (chk == WH_ERROR_TIMEOUT ) {
195+ return WH_ERROR_TIMEOUT ;
196196 } else if (chk < 0 && chk != WH_ERROR_OK ) {
197197 return chk ;
198198 }
@@ -254,9 +254,9 @@ int wh_Client_RngGenerate(whClientContext* ctx, uint8_t* out, uint32_t size)
254254
255255 /* Send request and get response */
256256 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
257- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
257+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
258258 if (ret == WH_ERROR_OK ) {
259- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
259+ ret = wh_Client_InitCryptTimeout (ctx );
260260 }
261261#endif
262262 if (ret == 0 ) {
@@ -446,9 +446,9 @@ int wh_Client_AesCtr(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
446446 wh_Utils_Hexdump ("[client] req packet: \n" , (uint8_t * )req , req_len );
447447#endif
448448 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
449- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
449+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
450450 if (ret == WH_ERROR_OK ) {
451- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
451+ ret = wh_Client_InitCryptTimeout (ctx );
452452 }
453453#endif
454454 /* read response */
@@ -575,9 +575,9 @@ int wh_Client_AesEcb(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
575575 wh_Utils_Hexdump ("[client] req packet: \n" , (uint8_t * )req , req_len );
576576#endif
577577 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
578- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
578+ #if defined(WOLFHSM_CFG_ENABLE_CWOLFHSM_CFG_CLIENT_TIMEOUTLIENT_TIMEOUT )
579579 if (ret == WH_ERROR_OK ) {
580- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
580+ ret = wh_Client_InitCryptTimeout (ctx );
581581 }
582582#endif
583583 /* read response */
@@ -701,9 +701,9 @@ int wh_Client_AesCbc(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
701701 wh_Utils_Hexdump ("[client] req packet: \n" , (uint8_t * )req , req_len );
702702#endif
703703 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
704- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
704+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
705705 if (ret == WH_ERROR_OK ) {
706- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
706+ ret = wh_Client_InitCryptTimeout (ctx );
707707 }
708708#endif
709709 /* read response */
@@ -842,9 +842,9 @@ int wh_Client_AesGcm(whClientContext* ctx, Aes* aes, int enc, const uint8_t* in,
842842
843843 /* Send request and receive response */
844844 ret = wh_Client_SendRequest (ctx , group , action , req_len , dataPtr );
845- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
845+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
846846 if (ret == WH_ERROR_OK ) {
847- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
847+ ret = wh_Client_InitCryptTimeout (ctx );
848848 }
849849#endif
850850 if (ret == 0 ) {
@@ -1058,9 +1058,9 @@ int wh_Client_AesGcmDma(whClientContext* ctx, Aes* aes, int enc,
10581058 if (ret == WH_ERROR_OK ) {
10591059 ret = wh_Client_SendRequest (ctx , group , action , reqLen , dataPtr );
10601060 }
1061- #if defined(WOLFHSM_CFG_ENABLE_CLIENT_CRYPTIMEOUT )
1061+ #if defined(WOLFHSM_CFG_CLIENT_TIMEOUT )
10621062 if (ret == WH_ERROR_OK ) {
1063- ret = wh_CommClient_InitCryptTimeout (ctx -> comm );
1063+ ret = wh_Client_InitCryptTimeout (ctx );
10641064 }
10651065#endif
10661066 if (ret == 0 ) {
0 commit comments