Skip to content

Commit 454b512

Browse files
committed
Fix alignment bug
1 parent 2b60f0b commit 454b512

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/internal.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,9 @@ static void wp11_Session_Final(WP11_Session* session)
964964
#ifdef HAVE_AESCMAC
965965
if ((session->init & ~WP11_INIT_DIGEST_MASK) == WP11_INIT_AES_CMAC_SIGN ||
966966
(session->init & ~WP11_INIT_DIGEST_MASK) == WP11_INIT_AES_CMAC_VERIFY) {
967+
#if (!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3))
967968
(void)wc_CmacFree(&session->params.cmac.cmac);
969+
#endif
968970
session->init = 0;
969971
}
970972
#endif
@@ -6981,8 +6983,8 @@ void WP11_Slot_Logout(WP11_Slot* slot)
69816983
ret = wp11_Object_Encode(object, 1);
69826984
object = object->next;
69836985
}
6986+
wc_ForceZero(slot->token.key, sizeof(slot->token.key));
69846987
}
6985-
wc_ForceZero(slot->token.key, sizeof(slot->token.key));
69866988
#endif
69876989
slot->token.loginState = WP11_APP_STATE_RW_PUBLIC;
69886990

0 commit comments

Comments
 (0)