Ticket #134 (new defect)
Opened 20 months ago
Unable to use PKCS#11 module simultaneously in multiple processes
| Reported by: | davidoc | Owned by: | opensc-devel@… |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | opensc | Version: | 0.11.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I am unable to use the PKCS#11 module simultaneously in Firefox and Thunderbird. I am using an Aladdin eToken Pro 64k with OpenSC 0.11.1 (from Ubuntu 7.04).
After following the instructions at http://www.opensc-project.org/opensc/wiki/MozillaSteps I can use the PKCS#11 module in Firefox and in Thunderbird, but only one program can be open at a time. If, for example, I start Firefox and then start Thunderbird, I get the following errors on the console from Thunderbird:
apdu.c:516:sc_transmit_apdu: unable to acquire lock
card-cardos.c:97:cardos_have_2048bit_package: APDU transmit failed: Generic reader error card.c:200:sc_connect_card: driver 'Siemens CardOS' init() failed: Generic reader error card.c:226:sc_connect_card: returning with: Generic reader error
Thunderbird will typically become unresponsive when this happens.
If I then close Thunderbird and use the PKCS#11 module in Firefox (to access a HTTPS site, for example) I get a dialog box with "Error Code: -8037" and the following errors on the console:
card-cardos.c:225:cardos_check_sw: required access right not granted
card-cardos.c:746:do_compute_signature: returning with: Security status not satisfied sec.c:53:sc_compute_signature: returning with: Security status not satisfied pkcs15-sec.c:331:sc_pkcs15_compute_signature: sc_compute_signature() failed: Security status not satisfied
At this point I must explicitly "Log out" and "Log in" to the token using Firefox's crypto device manager.
I have also found that if I attempt to run opensc-explorer or opensc-tool while Firefox is running then I receive the same set of "unable to acquire lock" messages.
Is this expected behaviour? Is there a way to allow multiple processes access to the PKCS#11 module (with some form of queueing or locking)?
I am new to OpenSC so please let me know if there is any other information I could provide to help resolve this issue.
Kind regards,
David O'Callaghan
