Easy yet simple CLI to access your JPKI card.
All platforms:
- PC/SC supported NFC reader
On GNU/Linux:
- pcsc-lite (libpcsclite)
On macOS or Linux, Homebrew Tap can be used for installation:
brew tap siketyan/tap
brew install jpki-cliAlternatively, build from source using Cargo:
cargo install jpki-cliDumps the certificate for digital signature:
jpki-cli crypto read-certificate > certificate.derIf you want the certificate for user authentication, insert --auth:
jpki-cli crypto --auth read-certificate > certificate.derSigns the data from stdin using key-pair for digital signature:
cat plain.txt | jpki-cli crypto sign > signature.sigVerifies the signature using the dumped certificate:
cat plain.txt | jpki-cli crypto verify certificate.der signature.sigGets the PIN status:
jpki-cli crypto stat
jpki-cli crypto --auth stat # Status of PIN for authenticationDumps the photo using PIN B (DoB YYMMDD + Expiry YYYY + CVC XXXX):
jpki-cli surface get photo > photo.jpg
# PIN: YYMMDDYYYYXXXXUsing PIN A (My Number) instead:
jpki-cli surface get photo > photo.jpg
# PIN: XXXXYYYYZZZZFor list of available data to dump, see the help:
jpki-cli surface get --helpGets the PIN status:
jpki-cli surface stat a # PIN Type A
jpki-cli surface stat b # PIN Type BReads the "My Number" from the card:
jpki-cli support get my-numberReads text attributes from the card as JSON:
jpki-cli support get attributes --pretty
jpki-cli support get attributes | jq # The output is JSON, so you can query it w/ jqGets the PIN status:
jpki-cli support stat