-
Notifications
You must be signed in to change notification settings - Fork 22
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
Can't load token using partition information #36
Comments
Hi @primetomas |
No idea. I don't Init the token using P11 myself, we init the token with the cavium tools and then just use it through JackNJI11. |
Hi @primetomas Thank you so much for your reply. We have tried with your approach using Cfm2Util tool.
And we have passed that same session handle as parameter for OpenSession and Login methods like below:
We could login using this hard coded method. But it's going to PARTITION_1 only. We tried a lot by changing other parameters using relevant methods. But nothing helped out. Your helps are greatly appreciated. Eagerly awaiting for your reply. :) Many Thanks |
First OpenSession is what gives you the session handle, you can not use an old session handle from another session. Sessions are created and destroyed, and you need to keep track of your sessions. Id is the slotID that you want to open a session to. This is a long, with the slot ID, you can get that from ListSlots (or somewhere from Cavium tools). PKCS#11 is not easy, and I don't know all details of it myself. You should study the standard specification to get an understanding of how slot IDs, slot labels and sessions work. Regards, |
Hi @primetomas, Thanks for the information. Even I tried to list the slot information. Always it's come as 1 even I have many partitions in PCIe card. Once again thanks for your guidance. I shall learn more about PKCS#11 as you guided. Many Thanks |
Hi,
I am using Cavium PCIe card for my HSM implementation.
I can't load token using:
CE.InitToken(INITSLOT, SO_PIN, "PARTITION_2".getBytes());
It's throwing below error:
11:49:23.743 [main] DEBUG com.hsm.rest.pkcs11.jacknji11.C - > C_InitToken slotID=1 pin=*** label="PARTITION_2 "
11:49:23.747 [main] DEBUG com.hsm.rest.pkcs11.jacknji11.C - < C_InitToken rv=0x00000007{ARGUMENTS_BAD}
Exception in thread "main" com.hsm.rest.pkcs11.jacknji11.CKRException: 0x00000007: ARGUMENTS_BAD
at com.hsm.rest.pkcs11.jacknji11.CE.InitToken(CE.java:273)
at org.pkcs11.jacknji11.Test.main(Test.java:163)
SDK Version: 2.03
HSM error 4000021c: Invalid Input Data/Params
C_InitToken failed with error CKR_ARGUMENTS_BAD : 0x00000007
can you please clarify that: is my approach correct when load token with specific partition of PCIe HSM card?
If so what I am missing or changes needed?
Many thanks
Paul
cc: @joelhockey , @primetomas
The text was updated successfully, but these errors were encountered: