You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ᐅ cat /usr/local/Cellar/softhsm/2.6.1/.bottle/etc/softhsm/softhsm2.conf
## SoftHSM v2 configuration file
directories.tokendir = /usr/local/var/lib/softhsm/tokens/
objectstore.backend = file
# ERROR, WARNING, INFO, DEBUG
log.level = ERROR
# If CKF_REMOVABLE_DEVICE flag should be set
slots.removable = false# Enable and disable PKCS#11 mechanisms using slots.mechanisms.
slots.mechanisms = ALL
# If the library should reset the state on fork
library.reset_on_fork = false
module path
ᐅ ls /usr/local/lib/softhsm/libsofthsm2.so
generate keypairs
# initialize slot
$ softhsm2-util --init-token --slot 0 --label test --pin 123456 --so-pin 123456
# generate keypair
$ pkcs11-tool --module /usr/local/lib/softhsm/libsofthsm2.so --pin 123456 --slot 1776036428 --keypairgen --label test1 --key-type EC:prime384v1
# check slot and tokens
$ pkcs11-tool --module /usr/local/lib/softhsm/libsofthsm2.so -OT
Available slots:
Slot 0 (0x69dc2a4c): SoftHSM slot ID 0x69dc2a4c
token label : test
token manufacturer : SoftHSM project
token model : SoftHSM v2
token flags : login required, rng, token initialized, PIN initialized, other flags=0x20
hardware version : 2.6
firmware version : 2.6
serial num : c20d727169dc2a4c
pin min/max : 4/255
Slot 1 (0x1): SoftHSM slot ID 0x1
token state: uninitialized
Using slot 0 with a present token (0x69dc2a4c)
Public Key Object; EC EC_POINT 384 bits
EC_POINT: 046104cd10b5dd2e22ea9a939123b1bb33a9757e53a45216a85c1c305f8910dabb3720c78a7eeb876aa9fe7fa7fb8aae5875527716015c144fa01217fa77f08b7ed5f41c2837aea0e538d5b7b6a486287401f93c6e304953a19ddb5513acd992f3ec4c
EC_PARAMS: 06052b81040022
label: test1
Usage: encrypt, verify, wrap, derive
Access: local
# check slot number
ᐅ softhsm2-util --show-slots
Available slots:
Slot 1776036428
Slot info:
Description: SoftHSM slot ID 0x69dc2a4c
Manufacturer ID: SoftHSM project
Hardware version: 2.6
Firmware version: 2.6
Token present: yes