Giter Site home page Giter Site logo

peculiarventures / graphene-cli Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 11.0 130 KB

The graphene-cli is a cross-platform command line tool for working with PKCS#11 devices

License: MIT License

TypeScript 99.49% JavaScript 0.51%
graphene hsm javascript pkca11 pkcs smartcard typescript

graphene-cli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

graphene-cli's Issues

exit hangs after loading a module

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.

Doesn't work in Windows

$ graphene
> module load -l /c/Windows/System32/rtPKCS11ECP.dll -n 123

Error Win32 error 126
at Error (native) PKCS11::Load:136

Help:
loads a specified PKCS#11 module

--lib -l Path to library
--name -n Name of module

Commands:
? Prints help information

Duplicate Key IDs being generated

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.

Error C_GenerateKey:894

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 ?

Parameter 1 Must be a Buffer

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.