@@ -887,6 +887,8 @@ static int InitSha512_Family(wc_Sha512* sha512, void* heap, int devId,
887887
888888#ifdef WOLFSSL_HASH_KEEP
889889 sha512 -> msg = NULL ;
890+ sha512 -> len = 0 ;
891+ sha512 -> used = 0 ;
890892#endif
891893
892894 /* call the initialization function pointed to by initfp */
@@ -927,11 +929,6 @@ int wc_InitSha512_ex(wc_Sha512* sha512, void* heap, int devId)
927929 sha512 -> ctx .mode = ESP32_SHA_INIT ;
928930#endif
929931
930- #ifdef MAX3266X_SHA_CB
931- if (wc_MXC_TPU_SHA_Init (& (sha512 -> mxcCtx )) != 0 ){
932- return BAD_FUNC_ARG ;
933- }
934- #endif
935932
936933 return InitSha512_Family (sha512 , heap , devId , InitSha512 );
937934}
@@ -1676,9 +1673,6 @@ void wc_Sha512Free(wc_Sha512* sha512)
16761673 }
16771674#endif
16781675
1679- #ifdef MAX3266X_SHA_CB
1680- wc_MXC_TPU_SHA_Free (& (sha512 -> mxcCtx ));
1681- #endif
16821676
16831677#if defined(WOLFSSL_ASYNC_CRYPT ) && defined(WC_ASYNC_ENABLE_SHA512 )
16841678 wolfAsync_DevCtxFree (& sha512 -> asyncDev , WOLFSSL_ASYNC_MARKER_SHA512 );
@@ -2062,12 +2056,6 @@ int wc_InitSha384_ex(wc_Sha384* sha384, void* heap, int devId)
20622056 sha384 -> ctx .mode = ESP32_SHA_INIT ;
20632057#endif
20642058
2065- #ifdef MAX3266X_SHA_CB
2066- ret = wc_MXC_TPU_SHA_Init (& (sha384 -> mxcCtx ));
2067- if (ret != 0 ) {
2068- return ret ;
2069- }
2070- #endif
20712059
20722060 ret = InitSha384 (sha384 );
20732061 if (ret != 0 ) {
@@ -2172,9 +2160,6 @@ void wc_Sha384Free(wc_Sha384* sha384)
21722160 }
21732161#endif
21742162
2175- #ifdef MAX3266X_SHA_CB
2176- wc_MXC_TPU_SHA_Free (& (sha384 -> mxcCtx ));
2177- #endif
21782163
21792164 ForceZero (sha384 , sizeof (* sha384 ));
21802165}
@@ -2313,12 +2298,6 @@ int wc_Sha512Copy(wc_Sha512* src, wc_Sha512* dst)
23132298 }
23142299#endif
23152300
2316- #ifdef MAX3266X_SHA_CB
2317- ret = wc_MXC_TPU_SHA_Copy (& (src -> mxcCtx ), & (dst -> mxcCtx ));
2318- if (ret != 0 ) {
2319- return ret ;
2320- }
2321- #endif
23222301
23232302#if defined(PSOC6_HASH_SHA2 )
23242303 wc_Psoc6_Sha1_Sha2_Init (dst , WC_PSOC6_SHA512 , 0 );
@@ -2756,12 +2735,6 @@ int wc_Sha384Copy(wc_Sha384* src, wc_Sha384* dst)
27562735 }
27572736#endif
27582737
2759- #ifdef MAX3266X_SHA_CB
2760- ret = wc_MXC_TPU_SHA_Copy (& (src -> mxcCtx ), & (dst -> mxcCtx ));
2761- if (ret != 0 ) {
2762- return ret ;
2763- }
2764- #endif
27652738
27662739#if defined(PSOC6_HASH_SHA2 )
27672740 wc_Psoc6_Sha1_Sha2_Init (dst , WC_PSOC6_SHA384 , 0 );
0 commit comments