diff --git a/src/sign-verify/clu_sign.c b/src/sign-verify/clu_sign.c index cfebc878..16c2eb88 100644 --- a/src/sign-verify/clu_sign.c +++ b/src/sign-verify/clu_sign.c @@ -880,8 +880,7 @@ int wolfCLU_sign_data_xmss(byte* data, char* out, int fSz, char* privKey) XmssKey key[1]; #endif - /* init the XMSS key */ - XMEMSET(key, 0, sizeof(XmssKey)); + /* init the XMSS key (wc_XmssKey_Init zeroizes the struct internally) */ ret = wc_XmssKey_Init(key, HEAP_HINT, 0); if (ret != 0) { wolfCLU_LogError("Failed to initialize XMSS Key." @@ -1060,8 +1059,7 @@ int wolfCLU_sign_data_xmssmt(byte* data, char* out, int fSz, char* privKey) XmssKey key[1]; #endif - /* init the xmss key */ - XMEMSET(key, 0, sizeof(XmssKey)); + /* init the xmss key (wc_XmssKey_Init zeroizes the struct internally) */ ret = wc_XmssKey_Init(key, HEAP_HINT, 0); if (ret != 0) { wolfCLU_LogError("Failed to initialize XMSS Key.\nRET: %d", ret);