File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -954,6 +954,23 @@ static void wp11_Session_Final(WP11_Session* session)
954954 }
955955#endif
956956#endif
957+ if ((session -> init & ~WP11_INIT_DIGEST_MASK ) == WP11_INIT_HMAC_SIGN ||
958+ (session -> init & ~WP11_INIT_DIGEST_MASK ) == WP11_INIT_HMAC_VERIFY ) {
959+ wc_HmacFree (& session -> params .hmac .hmac );
960+ session -> init = 0 ;
961+ }
962+ #ifdef WOLFSSL_CMAC
963+ if ((session -> init & ~WP11_INIT_DIGEST_MASK ) == WP11_INIT_AES_CMAC_SIGN ||
964+ (session -> init & ~WP11_INIT_DIGEST_MASK ) == WP11_INIT_AES_CMAC_VERIFY ) {
965+ (void )wc_CmacFree (& session -> params .cmac .cmac );
966+ session -> init = 0 ;
967+ }
968+ #endif
969+ if ((session -> init & ~WP11_INIT_DIGEST_MASK ) == WP11_INIT_DIGEST ) {
970+ wc_HashFree (& session -> params .digest .hash ,
971+ session -> params .digest .hashType );
972+ session -> init = 0 ;
973+ }
957974}
958975
959976#ifndef WOLFPKCS11_NO_STORE
You can’t perform that action at this time.
0 commit comments