Skip to content

Commit fdf21c7

Browse files
authored
Merge pull request #35 from siketyan/release/v0.2.0
chore: Release v0.2.0
2 parents 497a16d + c2f6732 commit fdf21c7

File tree

5 files changed

+47
-23
lines changed

5 files changed

+47
-23
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "jpki"
33
description = "Read certificates, sign and verify documents using your JPKI card."
4-
version = "0.1.8"
4+
version = "0.2.0"
55
license = "LGPL-2.1-or-later"
66
homepage = "https://github.com/siketyan/jpki-rs"
77
repository = "https://github.com/siketyan/jpki-rs.git"

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,11 @@ jpki = "0.1"
2626

2727
## 💚 Example
2828
See [jpki-cli](./cli) for an example usage of this crate.
29+
30+
## 🔗 References
31+
- "Technical Specifications and Utilization Methods of My Number Cards" by Fujitsu Co., Ltd.
32+
https://www.fujitsu.com/jp/documents/about/resources/publications/magazine/backnumber/vol68-4/paper10.pdf"
33+
- "認証局の運営" by Japan Agency for Local Authority Information Systems
34+
https://www.jpki.go.jp/ca/index.html
35+
- jpki/myna
36+
https://github.com/jpki/myna

android/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "jpki-android"
33
description = "Read certificates, sign and verify documents using your JPKI card."
4-
version = "0.1.8"
4+
version = "0.2.0"
55
license = "LGPL-2.1-or-later"
66
homepage = "https://github.com/siketyan/jpki-rs"
77
repository = "https://github.com/siketyan/jpki-rs.git"
@@ -19,5 +19,5 @@ crate-type = ["cdylib"]
1919
android_log = "0.1.3"
2020
log = "0.4.14"
2121
jni = "0.19.0"
22-
jpki = { version = "0.1", path = "..", features = ["digest"] }
22+
jpki = { version = "0.2", path = "..", features = ["digest"] }
2323
thiserror = "1.0"

cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "jpki-cli"
33
description = "Read certificates, sign and verify documents using your JPKI card."
4-
version = "0.1.8"
4+
version = "0.2.0"
55
license = "LGPL-2.1-or-later"
66
homepage = "https://github.com/siketyan/jpki-rs"
77
repository = "https://github.com/siketyan/jpki-rs.git"
@@ -15,7 +15,7 @@ edition = "2021"
1515
clap = { version = "3.1", features = ["derive"] }
1616
dialoguer = "0.10"
1717
hex = "0.4"
18-
jpki = { version = "0.1", path = "..", features = ["digest"] }
18+
jpki = { version = "0.2", path = "..", features = ["digest"] }
1919
pcsc = "2.7"
2020
thiserror = "1.0"
2121
tracing = "0.1"

cli/README.md

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,42 @@ Alternatively, build from source using Cargo:
2222
cargo 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

Comments
 (0)