Open Ichigo85 opened 5 years ago
Hello, I made a fork of Nexu and solved this issue, you can find it here. Briefly, I modified Pkcs11SignatureTokenAdapter#close method to finalize and clean PKCS#11 module every time. I'll make some more tests, anyway please let me know if it's a valid solution for you.
Hello, We are using different YubiKey SmartCards to authenticate user and sign documents, using PKCS#11 OpenSC module, sometimes on the same pc. What I discovered is that the first key inserted after starting NexU works fine and signs differents documents without problems. If I remove the first key and use the second one, or even if I insert the same key again, NexU can't sign anymore and I have to restart it. After some search I came to this debug log
and understood that OpenSC PKCS#11 library does not reinitialize slot, or doesn't detect the key anymore, but NexU does detect the key. That is because Slot info for slot 0 after removing becomes Slot info for slot 0: slotDescription: Virtual hotplug slot
manufacturerID: OpenSC Project flags: CKF_REMOVABLE_DEVICE | CKF_HW_SLOT
and what's important is that CKF_TOKEN_PRESENT flag is missing, as OpenSC library did not recognize any key inserted.
OpenSC version: 0.17 Win x64 (newer version not working with NexU) NexU version: 1.22
Any help?