What I did: The system used is Mac OS X 10.6 running Firefox 6. (1) I unloaded a successfully installed PKCS#11 security device. (2) I try to load that same security device (pkcs11.dylib). What happens: Firefox is unable to add the security module. After firefox is restarted the security module can be added. According to our analysis this is due to the fact that the security module returns CKR_ALREADY_INITIALIZED on Firefoxs call to C_Initialize(). From my point of view the behaviour of the PKCS#11 module is correct since Firefox has neither called C_Finalize() nor unloaded the library (dlclose) when unloading the the security module in step (1). What should happen: Firefox should call C_Finalize() on unloading a PKCS#11 security module.
Can you provide a testcase so we can confirm this bug?
opensc-pkcs11.so module is an example.