Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with SC-HSM smart cards on Omni Key 3x21 smart card readers on Windows #677

Closed
scottthomas007 opened this issue Feb 18, 2016 · 4 comments

Comments

@scottthomas007
Copy link

Bonjour Users,
I am trying to use SC-HSM smart cards with Omni key 3x21 SC reader with OpenSC. I am using correct versions of reader driver (hid_omnikey3x2x_x86_r1_2_20_0.exe) from the website
(http:https://www.hidglobal.com/drivers/19011). Also using the latest OpenSC version: 0.15
But when i try t run the basic command of dump then it generates the following error.
C:\Program Files\OpenSC Project\OpenSC\tools>pkcs15-tool.exe -D
Using reader with a card: OMNIKEY CardMan 3x21 0
PKCS#15 binding failed: Transmit failed

Interesting fact is that, if i replace Gemalto Smart card reader then the command runs successfully.
I tried the above steps on Windows XP, 7 and 8.1Pro. All result with the same error. Please guide me.
Regards
Scott Thomas

@scottthomas007
Copy link
Author

sc-hsm-pkcs11-test also fails with the Omni Key 3x21 SC reader

PKCS11 unittest running.
Calling C_GetFunctionList Calling C_Initialize - CKR_OK : Passed
Calling C_GetInfo - CKR_OK : Passed
Calling C_GetSlotList - CKR_OK : Passed
Calling C_GetSlotInfo for slot 1 - CKR_OK : Passed
Slot manufacturer: CardContact
Slot ID : Slot description: 1 : Gemplus USB Smart Card Reader 0
Slot flags: 6
Calling C_GetTokenInfo - CKR_TOKEN_NOT_PRESENT : No token
Calling C_GetSlotInfo for slot 5 - CKR_OK : Passed
Slot manufacturer: CardContact
Slot ID : Slot description: 5 : OMNIKEY CardMan 3x21 0
Slot flags: 6
Calling C_GetTokenInfo - CKR_TOKEN_NOT_RECOGNIZED : Failed
Error getting token information from cryptoki. slotid = 5, rc = 225 = CKR_TOKEN_NOT_RECOGNIZED

It passes when SC was inserted in Gemalto SC reader
C:\Program Files (x86)\CardContact\sc-hsm-pkcs11>sc-hsm-pkcs11-test.exe
PKCS11 unittest running.
Calling C_GetFunctionList Calling C_Initialize - CKR_OK : Passed
Calling C_GetInfo - CKR_OK : Passed
Calling C_GetSlotList - CKR_OK : Passed
Calling C_GetSlotInfo for slot 1 - CKR_OK : Passed
Slot manufacturer: CardContact
Slot ID : Slot description: 1 : Gemplus USB Smart Card Reader 0
Slot flags: 7
Calling C_GetTokenInfo - CKR_OK : Passed
Token label: SmartCard-HSM
Token flags: 40e
Using PIN 648219
Calling C_OpenSession - CKR_OK : Passed
Calling C_OpenSession - CKR_OK : Passed
Calling C_GetSessionInfo - CKR_OK : Passed
Session state 2 - Passed
Calling C_GetSessionInfo - CKR_OK : Passed
Session state 0 - Passed
Calling C_CloseSession - CKR_OK : Passed
Calling C_CloseSession with wrong handle - CKR_SESSION_HANDLE_INVALID : Passed
Calling C_CloseSession - CKR_OK : Passed
Calling C_OpenSession - CKR_OK : Passed
Calling C_OpenSession - CKR_OK : Passed
Calling C_Login(SO) - CKR_SESSION_READ_ONLY_EXISTS : Passed
Calling C_Login(SO) - CKR_SESSION_READ_ONLY : Passed
Calling C_Login(USER) - CKR_PIN_INCORRECT : Failed
Calling C_GetSessionInfo - CKR_OK : Passed
Session state 2 - Failed
Calling C_GetSessionInfo - CKR_OK : Passed
Session state 0 - Failed
Calling C_OpenSession - CKR_OK : Passed
Calling C_GetSessionInfo - CKR_OK : Passed
Session state 2 - Failed
Calling C_CloseSession - CKR_OK : Passed
Calling C_Logout - CKR_OK : Passed
Calling C_GetSessionInfo - CKR_OK : Passed
Session state 2 - Passed
Calling C_GetSessionInfo - CKR_OK : Passed
Session state 0 - Passed
Calling C_CloseAllSessions - CKR_OK : Passed

  • CKR_OK : Passed
    Calling C_FindObjectsInit - CKR_OK : Passed
    Calling C_FindObjects - CKR_OK : Passed
    Calling C_FindObjectsFinal - CKR_OK : Passed
    Calling C_GetSessionInfo - CKR_OK : Passed
    Session state 2 - Passed
    Calling C_Login User - CKR_PIN_INCORRECT : Failed

@CardContact
Copy link
Member

As described here (https://github.com/OpenSC/OpenSC/wiki/SmartCardHSM#reader-support), you can try the registry key that changes to TPDU mode.

@scottthomas007
Copy link
Author

Hi,

Good Hint, issue resolved. Enabled TPDU mode successfully. Many Thanks :)

Regards
Scott Thomas

@scottthomas007
Copy link
Author

#715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants