Skip to content

Commit 224ac9e

Browse files
committed
Add setting callback and MXC init when using arm asm with callbacks
1 parent 4ef0492 commit 224ac9e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

wolfcrypt/src/sha256.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,19 @@ int wc_InitSha256_ex(wc_Sha256* sha256, void* heap, int devId)
11061106
return ret;
11071107

11081108
sha256->heap = heap;
1109+
#ifdef WOLF_CRYPTO_CB
1110+
sha256->devId = devId;
1111+
sha256->devCtx = NULL;
1112+
#else
11091113
(void)devId;
1114+
#endif
1115+
1116+
#ifdef MAX3266X_SHA_CB
1117+
ret = wc_MXC_TPU_SHA_Init(&(sha256->mxcCtx));
1118+
if (ret != 0) {
1119+
return ret;
1120+
}
1121+
#endif
11101122

11111123
#ifdef WOLFSSL_SMALL_STACK_CACHE
11121124
sha256->W = NULL;

0 commit comments

Comments
 (0)