PeculiarVentures / graphene-cli

The graphene-cli is a cross-platform command line tool for working with PKCS#11 devices
MIT License
5 stars 11 forks source link

Update README to reflect how to use config file correctly #3

Open rmhrisk opened 7 years ago

rmhrisk commented 7 years ago

image

rmhrisk commented 7 years ago

This is what was there:

Create config file

// config.json
{
    "lib": "/usr/local/lib/softhsm/libsofthsm2.so",
    "libName": "SoftHSMv2.0",
    "slot": 0,
    "pin": "password"
}

Start console application

graphene

Load module from config file

> module init -p config.json

Get list of objects

> object list -s 0 
cliff0412 commented 3 years ago

encounter same problem here, not able to init

microshine commented 3 years ago

Looks like I removed that feature in the last update. I published the new version v1.1.0

This version supports module load -c <file> command

> module load -c config.json

Module info
==============================

  Library: /usr/local/lib/softhsm/libsofthsm2.so
  Name: SoftHSMv2.0
  Cryptoki version: 2.40

Slot info
==============================

  Handle: 62777142
  Description: SoftHSM slot ID 0x62777142
  Manufacturer ID: SoftHSM project
  Firm version: 2.6
  Hardware version: 2.6
  Flags:
    HW: false
    Removable device: false
    Token present: true
  Token:
    Label: My slot 0
    Manufacturer ID: SoftHSM project
    Model: SoftHSM v2
    Serial number: 6e6b3718e2777142
    Max PIN length: 255
    Min PIN length: 4
    Max session count: 0
    Session count: 18446744073709552000
    Max RW session count: 0
    RW session count: 18446744073709552000
    Total private memory: 18446744073709552000
    Free private memory: 18446744073709552000
    Total public memory: 18446744073709552000
    Free public memory: 18446744073709552000
    Firm version: 2.6
    Hardware version: 2.6
    Flags:
      Initialized: true
      Logged in: true

README file includes the description for the JSON file. See description

@WYANG008 Could you try it?