mirror of https://github.com/wolfSSL/wolfTPM.git
Merge pull request #334 from dgarske/cryptocb_hash
Fix for crypto callback hashing return code initializationpull/335/head
commit
9622323169
|
|
@ -436,8 +436,8 @@ int wolfTPM2_CryptoDevCb(int devId, wc_CryptoInfo* info, void* ctx)
|
|||
if (hashCtx)
|
||||
hash.handle.hndl = hashCtx->handle;
|
||||
|
||||
rc = 0; /* initialize return code */
|
||||
if (info->hash.in != NULL) { /* Update */
|
||||
rc = 0;
|
||||
/* If not single shot (update and final) then allocate context */
|
||||
if (hashCtx == NULL && info->hash.digest == NULL) {
|
||||
hashCtx = (WOLFTPM2_HASHCTX*)XMALLOC(sizeof(*hashCtx), NULL,
|
||||
|
|
|
|||
Loading…
Reference in New Issue