From 224ac9e2ffac2ee927b76984826f24230ffff80f Mon Sep 17 00:00:00 2001 From: night1rider Date: Mon, 26 Jan 2026 17:50:12 -0700 Subject: [PATCH] Add setting callback and MXC init when using arm asm with callbacks --- wolfcrypt/src/sha256.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wolfcrypt/src/sha256.c b/wolfcrypt/src/sha256.c index e441154e5f..c990653c3c 100644 --- a/wolfcrypt/src/sha256.c +++ b/wolfcrypt/src/sha256.c @@ -1106,7 +1106,19 @@ int wc_InitSha256_ex(wc_Sha256* sha256, void* heap, int devId) return ret; sha256->heap = heap; +#ifdef WOLF_CRYPTO_CB + sha256->devId = devId; + sha256->devCtx = NULL; +#else (void)devId; +#endif + +#ifdef MAX3266X_SHA_CB + ret = wc_MXC_TPU_SHA_Init(&(sha256->mxcCtx)); + if (ret != 0) { + return ret; + } +#endif #ifdef WOLFSSL_SMALL_STACK_CACHE sha256->W = NULL;