pkcs11-tools

Manage cryptographic keys and certificates on PKCS#11 tokens

brewmacoslinux
Try with needOr install directly
Source

About

Tools to manage objects on PKCS#11 crypotographic tokens

Commands

pkcs11-tool

Examples

list all smart cards and USB tokens connected$ pkcs11-tool --list-slots
show certificates stored on a security token$ pkcs11-tool --slot 0 --list-objects --type cert
generate a new private key on a hardware token$ pkcs11-tool --slot 0 --keypairgen --key-type RSA:2048 --label my-key
import a certificate into a smartcard$ pkcs11-tool --slot 0 --write-object cert.der --type cert --label my-cert
sign data using a key stored on a cryptographic token$ pkcs11-tool --slot 0 --sign --mechanism SHA256-RSA --input data.txt --output signature.bin