Ticket #126 (new defect)

Opened 2 years ago

Patch: PKCS11-spy does not gracefully handle post-Finalization call attempts

Reported by: harningt Owned by: opensc-devel@…
Priority: high Milestone: 0.11.5
Component: pkcs11-spy Version: 0.11.1
Severity: major Keywords: patch
Cc:

Description

Inside an application I am working on I found that it called Finalize twice (once explicitly, once in destructor).

In looking for a quick-fix (since the application is a bear to successfully compile in its current state) I found that nearly _all_ pkcs11-spy calls are unsafe. So I added a check for po being null before every call and if po == NULL, it returns CKR_CRYPTOKI_NOT_INITIALIZED since the only cause of po == NULL is non-initialization or early Finalization...

Attachments

pkcs11-spy-fix.patch (17.5 kB) - added by harningt 2 years ago.

Change History

Changed 2 years ago by harningt

Note: See TracTickets for help on using tickets.