Skip to content

Commit 049c19e

Browse files
committed
F-15864 - Force-clear authorization slots
1 parent d660f70 commit 049c19e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/tpm2_wrap.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,7 @@ int wolfTPM2_SetAuthSession(WOLFTPM2_DEV* dev, int index,
21992199

22002200
if (tpmSession == NULL) {
22012201
/* clearing auth session */
2202-
XMEMSET(&dev->session[index], 0, sizeof(TPM2_AUTH_SESSION));
2202+
TPM2_ForceZero(&dev->session[index], sizeof(TPM2_AUTH_SESSION));
22032203
return TPM_RC_SUCCESS;
22042204
}
22052205

@@ -2254,7 +2254,7 @@ int wolfTPM2_SetSessionHandle(WOLFTPM2_DEV* dev, int index,
22542254

22552255
/* Set password handle unless TPM session is available */
22562256
if (tpmSession == NULL) {
2257-
XMEMSET(session, 0, sizeof(TPM2_AUTH_SESSION));
2257+
TPM2_ForceZero(session, sizeof(TPM2_AUTH_SESSION));
22582258
session->sessionHandle = TPM_RS_PW;
22592259
}
22602260
else {

0 commit comments

Comments
 (0)