Bug 65401

Summary: Trust module forgets sessions when reinitializing
Product: p11-glue Reporter: Stef Walter <stefw>
Component: p11-kitAssignee: Stef Walter <stefw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: stefw
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: trust: Fix reinitialization of trust module

Description Stef Walter 2013-06-05 08:39:14 UTC
When calling C_Initialize on the trust module more than once the second call does not return CKR_CRYPTOKI_ALREADY_INITIALIZED as described by PKCS#11. It also does not ignore the second initialization, but leaks/clears all session handles and such.
Comment 1 Stef Walter 2013-06-05 08:50:22 UTC
Created attachment 80327 [details] [review]
trust: Fix reinitialization of trust module

    trust: Fix reinitialization of trust module
    
    Track number of C_Initialize calls, and require similar number
    of C_Finalize calls to finalize.
    
    This fixes leaks/disappearing sessions in the trust module.
Comment 2 Stef Walter 2013-06-05 11:24:14 UTC
Attachment 80327 [details] pushed as 3dc38f2 - trust: Fix reinitialization of trust module

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.