@@ -2526,7 +2526,7 @@ int wh_Client_CmacDma(whClientContext* ctx, Cmac* cmac, CmacType type,
25262526
25272527 /* Set up DMA state buffer in client address space */
25282528 req -> state .sz = sizeof (* cmac );
2529- ret = wh_Client_DmaProcessClientAddress (
2529+ ret = wh_Client_DmaProcessClientAddress (
25302530 ctx , (uintptr_t )cmac , (void * * )& stateAddr , req -> state .sz ,
25312531 WH_DMA_OPER_CLIENT_READ_PRE , (whDmaFlags ){0 });
25322532 req -> state .addr = stateAddr ;
@@ -2535,7 +2535,7 @@ int wh_Client_CmacDma(whClientContext* ctx, Cmac* cmac, CmacType type,
25352535 if (ret == WH_ERROR_OK && key != NULL ) {
25362536 /* Initialize with provided key */
25372537 req -> key .sz = keyLen ;
2538- ret = wh_Client_DmaProcessClientAddress (
2538+ ret = wh_Client_DmaProcessClientAddress (
25392539 ctx , (uintptr_t )key , (void * * )& keyAddr , req -> key .sz ,
25402540 WH_DMA_OPER_CLIENT_READ_PRE , (whDmaFlags ){0 });
25412541 req -> key .addr = keyAddr ;
@@ -2544,7 +2544,7 @@ int wh_Client_CmacDma(whClientContext* ctx, Cmac* cmac, CmacType type,
25442544 if (ret == WH_ERROR_OK && in != NULL ) {
25452545 /* Update operation */
25462546 req -> input .sz = inLen ;
2547- ret = wh_Client_DmaProcessClientAddress (
2547+ ret = wh_Client_DmaProcessClientAddress (
25482548 ctx , (uintptr_t )in , (void * * )& inAddr , req -> input .sz ,
25492549 WH_DMA_OPER_CLIENT_READ_PRE , (whDmaFlags ){0 });
25502550 req -> input .addr = inAddr ;
@@ -2553,7 +2553,7 @@ int wh_Client_CmacDma(whClientContext* ctx, Cmac* cmac, CmacType type,
25532553 if (ret == WH_ERROR_OK && outMac != NULL ) {
25542554 /* Finalize operation */
25552555 req -> output .sz = (size_t )* outMacLen ;
2556- ret = wh_Client_DmaProcessClientAddress (
2556+ ret = wh_Client_DmaProcessClientAddress (
25572557 ctx , (uintptr_t )outMac , (void * * )& outAddr , req -> output .sz ,
25582558 WH_DMA_OPER_CLIENT_WRITE_PRE , (whDmaFlags ){0 });
25592559 req -> output .addr = outAddr ;
@@ -3079,9 +3079,9 @@ int wh_Client_Sha224Dma(whClientContext* ctx, wc_Sha224* sha, const uint8_t* in,
30793079 uint8_t * dataPtr = NULL ;
30803080 whMessageCrypto_Sha2DmaRequest * req = NULL ;
30813081 whMessageCrypto_Sha2DmaResponse * resp = NULL ;
3082- uintptr_t inAddr = 0 ;
3083- uintptr_t outAddr = 0 ;
3084- uintptr_t stateAddr = 0 ;
3082+ uintptr_t inAddr = 0 ;
3083+ uintptr_t outAddr = 0 ;
3084+ uintptr_t stateAddr = 0 ;
30853085
30863086 /* Get data pointer from the context to use as request/response storage */
30873087 dataPtr = (uint8_t * )wh_CommClient_GetDataPtr (ctx -> comm );
@@ -3094,9 +3094,9 @@ int wh_Client_Sha224Dma(whClientContext* ctx, wc_Sha224* sha, const uint8_t* in,
30943094 dataPtr , WC_HASH_TYPE_SHA224 );
30953095
30963096 if (in != NULL || out != NULL ) {
3097- req -> state .sz = sizeof (* sha224 );
3098- req -> input .sz = inLen ;
3099- req -> output .sz = WC_SHA224_DIGEST_SIZE ; /* not needed, but YOLO */
3097+ req -> state .sz = sizeof (* sha224 );
3098+ req -> input .sz = inLen ;
3099+ req -> output .sz = WC_SHA224_DIGEST_SIZE ; /* not needed, but YOLO */
31003100
31013101 /* Perform address translations */
31023102 ret = wh_Client_DmaProcessClientAddress (
@@ -3153,7 +3153,7 @@ int wh_Client_Sha224Dma(whClientContext* ctx, wc_Sha224* sha, const uint8_t* in,
31533153 * wc_CryptoCb_Sha224Hash(sha224, NULL, 0, * hash) */
31543154 if ((ret == WH_ERROR_OK ) && (out != NULL )) {
31553155 /* Packet will have been trashed, so re-populate all fields */
3156- req -> finalize = 1 ;
3156+ req -> finalize = 1 ;
31573157
31583158#ifdef DEBUG_CRYPTOCB_VERBOSE
31593159 printf ("[client] SHA224 DMA FINAL: outAddr=%p\n" , out );
@@ -3364,9 +3364,9 @@ int wh_Client_Sha384Dma(whClientContext* ctx, wc_Sha384* sha, const uint8_t* in,
33643364 uint8_t * dataPtr = NULL ;
33653365 whMessageCrypto_Sha2DmaRequest * req = NULL ;
33663366 whMessageCrypto_Sha2DmaResponse * resp = NULL ;
3367- uintptr_t inAddr = 0 ;
3368- uintptr_t outAddr = 0 ;
3369- uintptr_t stateAddr = 0 ;
3367+ uintptr_t inAddr = 0 ;
3368+ uintptr_t outAddr = 0 ;
3369+ uintptr_t stateAddr = 0 ;
33703370
33713371 /* Get data pointer from the context to use as request/response storage */
33723372 dataPtr = (uint8_t * )wh_CommClient_GetDataPtr (ctx -> comm );
@@ -3379,9 +3379,9 @@ int wh_Client_Sha384Dma(whClientContext* ctx, wc_Sha384* sha, const uint8_t* in,
33793379 dataPtr , WC_HASH_TYPE_SHA384 );
33803380
33813381 if (in != NULL || out != NULL ) {
3382- req -> state .sz = sizeof (* sha384 );
3383- req -> input .sz = inLen ;
3384- req -> output .sz = WC_SHA384_DIGEST_SIZE ; /* not needed, but YOLO */
3382+ req -> state .sz = sizeof (* sha384 );
3383+ req -> input .sz = inLen ;
3384+ req -> output .sz = WC_SHA384_DIGEST_SIZE ; /* not needed, but YOLO */
33853385
33863386 /* Perform address translations */
33873387 ret = wh_Client_DmaProcessClientAddress (
@@ -3407,7 +3407,7 @@ int wh_Client_Sha384Dma(whClientContext* ctx, wc_Sha384* sha, const uint8_t* in,
34073407 /* Caller invoked SHA Update:
34083408 * wc_CryptoCb_Sha384Hash(sha384, data, len, NULL) */
34093409 if (in != NULL ) {
3410- req -> finalize = 0 ;
3410+ req -> finalize = 0 ;
34113411#ifdef DEBUG_CRYPTOCB_VERBOSE
34123412 printf ("[client] SHA384 DMA UPDATE: inAddr=%p, inSz=%u\n" , in , inLen );
34133413#endif
@@ -3437,7 +3437,7 @@ int wh_Client_Sha384Dma(whClientContext* ctx, wc_Sha384* sha, const uint8_t* in,
34373437 * wc_CryptoCb_Sha384Hash(sha384, NULL, 0, * hash) */
34383438 if ((ret == WH_ERROR_OK ) && (out != NULL )) {
34393439 /* Packet will have been trashed, so re-populate all fields */
3440- req -> finalize = 1 ;
3440+ req -> finalize = 1 ;
34413441
34423442#ifdef DEBUG_CRYPTOCB_VERBOSE
34433443 printf ("[client] SHA384 DMA FINAL: outAddr=%p\n" , out );
@@ -3660,9 +3660,9 @@ int wh_Client_Sha512Dma(whClientContext* ctx, wc_Sha512* sha, const uint8_t* in,
36603660 uint8_t * dataPtr = NULL ;
36613661 whMessageCrypto_Sha2DmaRequest * req = NULL ;
36623662 whMessageCrypto_Sha2DmaResponse * resp = NULL ;
3663- uintptr_t inAddr = 0 ;
3664- uintptr_t outAddr = 0 ;
3665- uintptr_t stateAddr = 0 ;
3663+ uintptr_t inAddr = 0 ;
3664+ uintptr_t outAddr = 0 ;
3665+ uintptr_t stateAddr = 0 ;
36663666
36673667 /* Get data pointer from the context to use as request/response storage */
36683668 dataPtr = (uint8_t * )wh_CommClient_GetDataPtr (ctx -> comm );
@@ -3675,9 +3675,9 @@ int wh_Client_Sha512Dma(whClientContext* ctx, wc_Sha512* sha, const uint8_t* in,
36753675 dataPtr , WC_HASH_TYPE_SHA512 );
36763676
36773677 if (in != NULL || out != NULL ) {
3678- req -> state .sz = sizeof (* sha512 );
3679- req -> input .sz = inLen ;
3680- req -> output .sz = WC_SHA512_DIGEST_SIZE ; /* not needed, but YOLO */
3678+ req -> state .sz = sizeof (* sha512 );
3679+ req -> input .sz = inLen ;
3680+ req -> output .sz = WC_SHA512_DIGEST_SIZE ; /* not needed, but YOLO */
36813681
36823682 /* Perform address translations */
36833683 ret = wh_Client_DmaProcessClientAddress (
@@ -3734,7 +3734,7 @@ int wh_Client_Sha512Dma(whClientContext* ctx, wc_Sha512* sha, const uint8_t* in,
37343734 * wc_CryptoCb_Sha512Hash(sha512, NULL, 0, * hash) */
37353735 if ((ret == WH_ERROR_OK ) && (out != NULL )) {
37363736 /* Packet will have been trashed, so re-populate all fields */
3737- req -> finalize = 1 ;
3737+ req -> finalize = 1 ;
37383738
37393739#ifdef DEBUG_CRYPTOCB_VERBOSE
37403740 printf ("[client] SHA512 DMA FINAL: outAddr=%p\n" , out );
@@ -4350,8 +4350,8 @@ static int _MlDsaMakeKeyDma(whClientContext* ctx, int level,
43504350 uint8_t * dataPtr = NULL ;
43514351 whMessageCrypto_MlDsaKeyGenDmaRequest * req = NULL ;
43524352 whMessageCrypto_MlDsaKeyGenDmaResponse * res = NULL ;
4353- uintptr_t keyAddr = 0 ;
4354- uint64_t keyAddrSz = 0 ;
4353+ uintptr_t keyAddr = 0 ;
4354+ uint64_t keyAddrSz = 0 ;
43554355
43564356 if (ctx == NULL ) {
43574357 return WH_ERROR_BADARGS ;
@@ -4385,7 +4385,7 @@ static int _MlDsaMakeKeyDma(whClientContext* ctx, int level,
43854385 req -> level = level ;
43864386 req -> flags = flags ;
43874387 req -> keyId = key_id ;
4388- req -> key .sz = keyAddrSz = sizeof (buffer );
4388+ req -> key .sz = keyAddrSz = sizeof (buffer );
43894389
43904390 ret = wh_Client_DmaProcessClientAddress (
43914391 ctx , (uintptr_t )buffer , (void * * )& keyAddr , keyAddrSz ,
@@ -4416,11 +4416,11 @@ static int _MlDsaMakeKeyDma(whClientContext* ctx, int level,
44164416
44174417 if (ret == WH_ERROR_OK ) {
44184418 /* Get response structure pointer, validates generic header
4419- * rc */
4419+ * rc */
44204420 ret = _getCryptoResponse (dataPtr , WC_PK_TYPE_PQC_SIG_KEYGEN ,
4421- (uint8_t * * )& res );
4421+ (uint8_t * * )& res );
44224422 /* wolfCrypt allows positive error codes on success in some
4423- * scenarios */
4423+ * scenarios */
44244424 if (ret >= 0 ) {
44254425 /* Key is cached on server or is ephemeral */
44264426 key_id = (whKeyId )(res -> keyId );
@@ -4470,8 +4470,8 @@ int wh_Client_MlDsaSignDma(whClientContext* ctx, const byte* in, word32 in_len,
44704470 whMessageCrypto_MlDsaSignDmaRequest * req = NULL ;
44714471 whMessageCrypto_MlDsaSignDmaResponse * res = NULL ;
44724472 uint8_t * dataPtr = NULL ;
4473- uintptr_t inAddr = 0 ;
4474- uintptr_t outAddr = 0 ;
4473+ uintptr_t inAddr = 0 ;
4474+ uintptr_t outAddr = 0 ;
44754475
44764476 /* Transaction state */
44774477 whKeyId key_id ;
@@ -4535,13 +4535,13 @@ int wh_Client_MlDsaSignDma(whClientContext* ctx, const byte* in, word32 in_len,
45354535
45364536 /* Set up DMA buffers */
45374537 req -> msg .sz = in_len ;
4538- ret = wh_Client_DmaProcessClientAddress (
4538+ ret = wh_Client_DmaProcessClientAddress (
45394539 ctx , (uintptr_t )in , (void * * )& inAddr , req -> msg .sz ,
45404540 WH_DMA_OPER_CLIENT_READ_PRE , (whDmaFlags ){0 });
45414541 req -> msg .addr = inAddr ;
45424542
45434543 req -> sig .sz = * out_len ;
4544- ret = wh_Client_DmaProcessClientAddress (
4544+ ret = wh_Client_DmaProcessClientAddress (
45454545 ctx , (uintptr_t )out , (void * * )& outAddr , req -> sig .sz ,
45464546 WH_DMA_OPER_CLIENT_WRITE_PRE , (whDmaFlags ){0 });
45474547 req -> sig .addr = outAddr ;
@@ -4663,12 +4663,12 @@ int wh_Client_MlDsaVerifyDma(whClientContext* ctx, const byte* sig,
46634663
46644664 /* Set up DMA buffers */
46654665 req -> sig .sz = sig_len ;
4666- ret = wh_Client_DmaProcessClientAddress (
4666+ ret = wh_Client_DmaProcessClientAddress (
46674667 ctx , (uintptr_t )sig , (void * * )& sigAddr , sig_len ,
46684668 WH_DMA_OPER_CLIENT_READ_PRE , (whDmaFlags ){0 });
46694669 req -> sig .addr = sigAddr ;
46704670 req -> msg .sz = msg_len ;
4671- ret = wh_Client_DmaProcessClientAddress (
4671+ ret = wh_Client_DmaProcessClientAddress (
46724672 ctx , (uintptr_t )msg , (void * * )& msgAddr , msg_len ,
46734673 WH_DMA_OPER_CLIENT_WRITE_PRE , (whDmaFlags ){0 });
46744674 req -> msg .addr = msgAddr ;
0 commit comments