-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Session C_FindObjectsInit get not PrivateKey Bug! #40
Comments
Can you give sample code and details about your environment? |
I am using Windows.10 x64 operation system. var lib = "C:/windows/system32/akisp11.dll"; var mod = Module.load(lib, "akis"); mod.initialize(); var session = mod.getSlots(0).open(); // Return 0! PRivate Key object. Graphene-pk11 Library
After objects.push(hObject). rv= this.lib.C_FindObjectsFİnal(this.handle); return 0 object! Please help me. |
@erdembas I will try to help. It seems akisp11.dll is for uekae based devices/cards. Unfortunately I doubt we can get one here in the US or Russia for testing so we will have some trial and error helping you on this one. Do you know this device has been initialized? Do you know if it has any keys on it? Based on the return you are seeing it seems the card has no contents. If you do not one thing to try is to use opensc and it's pkcs11-tool to inspect the card, this way you can clearly check the contents of the card without taking a circular dependency on Graphene. Another question becomes can you create keys on the card? One way to check this is to try with the Graphene CLI. With it you can check the performance of the card or simply generate a key:
The CLI is like pkcs11-tool, if they see something different there is likley a problem with Graphene. Please let us know what you find out. Ryan |
SmartCard is initialized and exist any private key on card. I am using java sunpkcs11 provider access private key and create digital signature but using graphene-pk11 not access private key.. |
Can you confirm if the graphene-cli can access the key? Please run "test gen -it 1 -a all" and capture all console output up until and after that command and paste it here. |
It can be a problem with reading structure data from PKCS11 on Windows (TooTallNate/ref-struct#22) |
Ah, yes I had forgotten about this. @erdembas can you try on a non-windows machine? |
Linking #39 |
SUCCESS.. THE PROBLEM IS FOR WINDOWS. @rmhrisk I have just tried on Ubuntu 16.04 x32 os and got success. Return two private key result. Thanks |
@erdembas thanks for doing the check, our issue was either with node-ffi or our use of it, to fix this we ended up re-writing to take out this dependency. @microshine will do a publication of a new version in the next couple days that should resolve this, we would like to ask that once it is released that you test your token again on Windows. |
Hi,
session.find({ class: graphene.ObjectClass.PRIVATE_KEY }) [C_FindObjectsInit] method get not private key object.
Please help me.
The text was updated successfully, but these errors were encountered: