mirror of https://github.com/wolfSSL/wolfTPM.git
Fixes to avoid struct assignment, which can result is unaligned access (use memcpy).
parent
241f55415c
commit
e9f89db538
|
@ -870,7 +870,8 @@ int wolfTPM2_SetAuthSession(WOLFTPM2_DEV* dev, int index,
|
|||
|
||||
/* define the symmetric algorithm */
|
||||
session->authHash = tpmSession->authHash;
|
||||
session->symmetric = tpmSession->handle.symmetric;
|
||||
XMEMCPY(&session->symmetric, &tpmSession->handle.symmetric,
|
||||
sizeof(TPMT_SYM_DEF));
|
||||
|
||||
/* fresh nonce generated in TPM2_CommandProcess based on this size */
|
||||
session->nonceCaller.size = TPM2_GetHashDigestSize(WOLFTPM2_WRAP_DIGEST);
|
||||
|
|
Loading…
Reference in New Issue