pkcs11-tool
Utility for managing and using PKCS #11 security tokens. tldr-pages
On several platforms
Several platforms
List slots and their potential token, using a specific module (e.g. /usr/lib/softhsm/libsofthsm2.so)
pkcs11-tool --module path/to/module.so --list-slots --list-token-slotsIdentifyList objects in a specific slot. (Note: slot_id is not the slot index shown as "Slot X")
pkcs11-tool --list-objects --pin auth_pin --slot slot_idIdentifyCreate a new object with a specific label and type
pkcs11-tool --slot slot_id --pin auth_pin --type cert --label "label" --id 01 --write-object path/to/cert.crtIdentifyDelete an object by its label and type
pkcs11-tool --slot slot_id --pin auth_pin --type cert --label "label" --delete-objectIdentify