Crates.io | jpki-cli |
lib.rs | jpki-cli |
version | 0.4.3 |
source | src |
created_at | 2022-03-02 08:50:15.413849 |
updated_at | 2023-10-21 02:26:20.362157 |
description | Read certificates, sign and verify documents using your JPKI card. |
homepage | https://github.com/siketyan/jpki-rs |
repository | https://github.com/siketyan/jpki-rs.git |
max_upload_size | |
id | 542086 |
size | 53,789 |
Easy yet simple CLI to access your JPKI card.
All platforms:
On GNU/Linux:
On macOS or Linux, Homebrew Tap can be used for installation:
brew tap siketyan/tap
brew install jpki-cli
Alternatively, build from source using Cargo:
cargo install jpki-cli
Dumps the certificate for digital signature:
jpki-cli crypto read-certificate > certificate.der
If you want the certificate for user authentication, insert --auth
:
jpki-cli crypto --auth read-certificate > certificate.der
Signs the data from stdin using key-pair for digital signature:
cat plain.txt | jpki-cli crypto sign > signature.sig
Verifies the signature using the dumped certificate:
cat plain.txt | jpki-cli crypto verify certificate.der signature.sig
Gets the PIN status:
jpki-cli crypto stat
jpki-cli crypto --auth stat # Status of PIN for authentication
Dumps the photo using PIN B (DoB YYMMDD
+ Expiry YYYY
+ CVC XXXX
):
jpki-cli surface get photo > photo.jpg
# PIN: YYMMDDYYYYXXXX
Using PIN A (My Number) instead:
jpki-cli surface get photo > photo.jpg
# PIN: XXXXYYYYZZZZ
For list of available data to dump, see the help:
jpki-cli surface get --help
Gets the PIN status:
jpki-cli surface stat a # PIN Type A
jpki-cli surface stat b # PIN Type B
Reads the "My Number" from the card:
jpki-cli support get my-number
Reads 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/ jq
Gets the PIN status:
jpki-cli support stat