Ticket #108 (new defect)

Opened 2 years ago

Last modified 2 years ago

PKCS#11 - Session handlers must be validated before use

Reported by: alonbl Owned by: opensc-devel@…
Priority: normal Milestone:
Component: pkcs11 Version: trunk
Severity: major Keywords:
Cc: kaups@…

Description

When card is removed/inserted, C_FindObjectsInit succeeds with previous session handle when it should failed with CKR_DEVICE_REMOVED or any other error. All session handlers must be invalidated when card is removed.

I guess session_start_operation at misc.c should be modified to test the actual status of the session before returning.

Change History

Changed 2 years ago by alonbl

  • version changed from 0.11.0 to trunk

Changed 2 years ago by alonbl

I've also noticed that the error is from example C_Decrypt and not C_DecryptInit... The same solution may be applied, modifying session_start_operation... C_SignInit will be also fixed.

Changed 2 years ago by alonbl

  • cc kaups@… added
Note: See TracTickets for help on using tickets.