peculiarventures / graphene-cli Goto Github PK
View Code? Open in Web Editor NEWThe graphene-cli is a cross-platform command line tool for working with PKCS#11 devices
License: MIT License
The graphene-cli is a cross-platform command line tool for working with PKCS#11 devices
License: MIT License
As the title says. Trying to exit before loading a module is quick. Once a module is loaded the exit command hangs for a long time.
$ graphene
> module load -l /c/Windows/System32/rtPKCS11ECP.dll -n 123Error Win32 error 126
at Error (native) PKCS11::Load:136Help:
loads a specified PKCS#11 module--lib -l Path to library
--name -n Name of moduleCommands:
? Prints help information
Test commands return empty tables
Hi there,
I'm encountering a potential bug using a LunaHSM. When generating new key pairs using the object generate ...
command I am getting unique handles but duplicate ID values when looking at the object info.
This seems to happen when I create a key pair, back out of graphene and re enter it.
My application uses the graphene-cli tool to programmatically run commands. This means that each time I want to generate a key pair or sign data I have to reopen graphene (npx graphene) and load the module.
This bug doesn't happen when I generate all keys sequentially within the same instance of graphene.
Seems that reloading the module or reopening the slot causes the IDs on generated objects to return to 0100000000000000.
Also, when signing data using existing objects, the param is called --handle but when passing in the handle value (ex. 1) it cannot find the signing key. Passing in the full ID of 0100000000000000 works as expected though.
These 2 things in conjunction prevent me from accurately selecting a key to sign with since I have duplicate IDs. Seems random which key actually gets selected when it's time to sign.
I would greatly appreciate any help you can provide.
When I perform:
module load -l /opt/safenet/lunaclient/lib/libCryptoki2_64.so -n LunaHSMslot open --slot 0
and:
slot open --slot 0
I have one slot with info:
Handle:
Description: HA Virtual Card Slot
Manufacturer ID: Safenet, Inc.
Firm version: 7.4
Hardware version: 0.0
Flags:
HW: true
Removable device: false
Token present: true
Token:
Label: Test
Manufacturer ID: Safenet, Inc.
Model: LunaVirtual
Serial number: 11365537499121
Max PIN length: 255
Min PIN length: 7
Max session count: 0
Session count: 0
Max RW session count: 0
RW session count: 0
Total private memory: 409782
Free private memory: 403510
Total public memory: 409782
Free public memory: 403510
Firm version: 7.4
Hardware version: 0.0
Flags:
Initialized: true
Logged in: true
In object test
I got:
Error Unknown error:2147483674
at Error (native) C_GenerateKey:894
Also with test command test sign --slot 0 -it 200 -a all
I got:
Error Unknown error:2147483674
at Error (native) C_GenerateKeyPair:923
object list
gave me:
ID | Class | Label |
---|---|---|
1e8482 | CERTIFICATE | CERT |
object info -i 1e8482
Name | Value |
---|---|
Handle | 1e8482 |
Class | CERTIFICATE |
Label | CERT |
Token | true |
Private | false |
Modifiable | true |
I cannot test anything because of this C_GenerateKeyPair:923 error.
What could be the reason of that ?
After i made all instalattions, i did executed slot open --slot 0 --pin 123456
and it returns: Parameter 1 Must be a Buffer
Help me, please!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.