|
8 | 8 | - [Directory Structure](#directory-structure)
|
9 | 9 | - [<code>/src/tools/chip-cert</code>](#srctoolschip-cert)
|
10 | 10 | - [Usage Examples](#usage-examples)
|
| 11 | + - [Building](#building) |
11 | 12 | - [Operational Certificates Usage Examples](#operational-certificates-usage-examples)
|
12 | 13 | - [Attestation Certificates Usage Examples](#attestation-certificates-usage-examples)
|
13 | 14 | - [Command Reference](#command-reference)
|
|
21 | 22 | - [gen-att-cert](#gen-att-cert)
|
22 | 23 | - [validate-att-cert](#validate-att-cert)
|
23 | 24 | - [gen-cd](#gen-cd)
|
| 25 | + - [gen-cd example](#gen-cd-example) |
24 | 26 | - [version](#version)
|
25 | 27 |
|
26 | 28 | ## Introduction
|
@@ -57,6 +59,18 @@ Specify '--help' option for detail instructions on usage of each command:
|
57 | 59 | ./chip-cert gen-cert --help
|
58 | 60 | ```
|
59 | 61 |
|
| 62 | +### Building |
| 63 | + |
| 64 | +The `chip-cert` tool will be built when `gn_build.sh` is run. To build just the |
| 65 | +`chip-cert` tool locally: |
| 66 | + |
| 67 | +``` |
| 68 | +. ./scripts/activate.sh |
| 69 | +gn gen out/host |
| 70 | +ninja -C out/host chip-cert |
| 71 | +./out/host/chip-cert help |
| 72 | +``` |
| 73 | + |
60 | 74 | ## Operational Certificates Usage Examples
|
61 | 75 |
|
62 | 76 | Example command that can be used to generate CHIP root certificate and private
|
@@ -745,6 +759,24 @@ HELP OPTIONS
|
745 | 759 | Print the version and then exit.
|
746 | 760 | ```
|
747 | 761 |
|
| 762 | +#### gen-cd example |
| 763 | + |
| 764 | +An example of generating a Certificate Declaration (CD) follows: |
| 765 | + |
| 766 | +``` |
| 767 | +./chip-cert gen-cd -C credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem -K credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem --out cd.bin -f 1 -V FFF1 -p 8000 -d 0016 -c "ZIG0000000000000000" -l 0 -i 0 -n 0001 -t 0 |
| 768 | +``` |
| 769 | + |
| 770 | +The binary output of the CMS signed CD is written to `cd.bin`. |
| 771 | + |
| 772 | +- Replace -V FFF1 with your VID in uppercase hex with zero padding |
| 773 | +- Replace -p 8000 with your PID in uppercase hex with zero padding |
| 774 | +- Replace -d 0016 with your primary device type in uppercase hex with zero |
| 775 | + padding |
| 776 | + |
| 777 | +NOTE: `dac-origin-vendor-id` and `dac-origin-product-id` are not included in |
| 778 | +this example. |
| 779 | + |
748 | 780 | ### version
|
749 | 781 |
|
750 | 782 | Displays the version of the tool and copyright information.
|
|
0 commit comments