@@ -22,26 +22,42 @@ Alternatively, build from source using Cargo:
2222cargo install jpki-cli
2323```
2424
25- ## 💚 Example
25+ ## 💚 Examples
26+ ### Crypto AP
27+ Dumps the certificate for digital signature:
28+ ``` shell
29+ jpki-cli read-certificate > certificate.der
30+ ```
31+
32+ If you want the certificate for user authentication, append ` --auth ` :
33+ ``` shell
34+ jpki-cli read-certificate --auth > certificate.der
35+ ```
36+
37+ Signs the data from stdin using key-pair for digital signature:
38+ ``` shell
39+ cat plain.txt | jpki-cli sign > signature.sig
2640```
27- jpki-cli 0.1.8
28- Naoki Ikeguchi <me@s6n.jp>
29- Read certificates, sign and verify documents using your JPKI card.
3041
31- USAGE:
32- jpki-cli [OPTIONS] <SUBCOMMAND>
42+ Verifies the signature using the dumped certificate:
43+ ``` shell
44+ cat plain.txt | jpki-cli verify certificate.der signature.sig
45+ ```
3346
34- OPTIONS:
35- -a, --auth Uses the key-pair for user authentication, instead of for digital signature
36- -c, --ca While reading certificates, reads their CA certificate instead
37- -h, --help Print help information
38- -V, --version Print version information
47+ ### Surface AP
48+ Dumps the photo using PIN B (DoB ` YYMMDD ` + Expiry ` YYYY ` + CVC ` XXXX ` ):
49+ ``` shell
50+ jpki-cli surface photo > photo.jpg
51+ # PIN: YYMMDDYYYYXXXX
52+ ```
3953
40- SUBCOMMANDS:
41- help Print this message or the help of the given subcommand(s)
42- read-certificate Reads a certificate in the JPKI card
43- sign Writes a signature of the document
44- surface Reads the surface information from the card. PIN type B (DoB + Expiry +
45- PIN) is required by default
46- verify Verifies the signed digest
54+ Using PIN A (My Number) instead:
55+ ``` shell
56+ jpki-cli surface --all photo > photo.jpg
57+ # PIN: XXXXYYYYZZZZ
4758```
59+
60+ For list of available data to dump, see the help:
61+ ``` shell
62+ jpki-cli surface --help
63+ ```
0 commit comments