Files
VeraCrypt/src/Mount
Mounir IDRASSI 1ac1c891a6 Security tokens: release cached EMV card data when closing sessions
EMVToken::EMVCards keeps every EMV card that was read, together with
the ICC and issuer public key certificates and the CPLC data that make
up its keyfile, and keeps the card connected. Closing all security
token sessions, the option to close them after mounting and wiping the
cache on auto-dismount only closed PKCS#11 sessions, so this data
stayed in memory until VeraCrypt exited.

Add Token::CloseAllSessions, which also releases the cached cards so
that their data is erased and their connection closed, and use it
wherever all sessions are closed. This resolves the "TODO Use Token"
notes at these call sites on Windows.

Keep the EMV cache private and serialize reader enumeration, card reads,
and cache cleanup with the same mutex. Closing sessions waits for active
reads to release their local card references before erasing the cache,
so a read cannot race destruction or insert its card after cleanup.
2026-10-15 07:57:11 +02:00
..
2026-06-09 09:56:25 +09:00
2026-06-09 09:56:25 +09:00
2026-06-09 09:56:25 +09:00
2026-06-09 09:56:25 +09:00
2026-10-11 15:56:54 +09:00