Hi!
I am on Windows 2019 Server.
When trying to use the NitroKey HSM with opensc-pkcs11.dll I get an error when I want to login (error 224).
I used “opensc-tool.exe -l” and found that my internal smart card reader was enumerated as #0 and the NitroKey as #1. So I disabled the internal reader in the device manager. This solved the problem.
But I feel this is no permanent solution to the problem. I thought that the label of the NitroKey would be enough to identify it . Why does it have to be enumerated as reader #0 to work with pkcs11?
Thanks for your help!
What kind of PKCS#11 application are you using? Most smartcard apps have a way to select the reader.
I am developing my own application. Does the pkcs11 library have a function to select the reader?
In PKCS#11 the card reader is mapped to one (or multiple) slots. Try
pkcs11-tool -L
to see the list of slots and slot ids (in braces).
Programmatically you need to use C_GetSlotList() to enumerate slots in which a token (e.g. the HSM) is inserted.