Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 1 | ndnsec-cert-dump |
| 2 | ================ |
| 3 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 4 | Synopsis |
| 5 | -------- |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 6 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 7 | **ndnsec cert-dump** [**-h**] [**-p**] [**-r** [**-H** *host*] [**-P** *port*]] |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 8 | [**-i**\|\ **-k**\|\ **-f**] *name* |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 9 | |
| 10 | Description |
| 11 | ----------- |
| 12 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 13 | This command reads an NDN certificate, either from the **Public Information Base (PIB)** |
| 14 | or from the specified file, and prints it on the standard output, either in Base64 encoding |
| 15 | or in a human-readable format. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 16 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 17 | By default, *name* is interpreted as a certificate name. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 18 | |
| 19 | Options |
| 20 | ------- |
| 21 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 22 | .. option:: -i, --identity |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 23 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 24 | Interpret *name* as an identity name. If specified, the certificate to dump |
| 25 | is the default certificate of the identity. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 26 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 27 | .. option:: -k, --key |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 28 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 29 | Interpret *name* as a key name. If specified, the certificate to dump is the |
| 30 | default certificate of the key. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 31 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 32 | .. option:: -f, --file |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 33 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 34 | Interpret *name* as a path to a file containing the certificate. If *name* |
| 35 | is "-", the certificate will be read from the standard input. |
| 36 | |
| 37 | .. option:: -p, --pretty |
| 38 | |
| 39 | Print the certificate in a human-readable format. |
| 40 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 41 | Examples |
| 42 | -------- |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 43 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 44 | Export a certificate from the local PIB to the standard output with Base64 encoding:: |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 45 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 46 | $ ndnsec cert-dump /ndn/test/david/KEY/%7FE%1C%18%D2%03%BD%3F/self/v=1719080300644 |
| 47 | Bv0BOAcxCANuZG4IBHRlc3QIBWRhdmlkCANLRVkICH9FHBjSA70/CARzZWxmNggA |
| 48 | AAGQQSuwZBQJGAECGQQANu6AFVswWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQ8 |
| 49 | 7QbdgubF3IznydpZ8PuppHgVRufGsUMDvHpS8Rw93rAAsw+8aVcNmw94wzpALWzD |
| 50 | 3femcs+qHaWoIOBOn26SFlIbAQMcIwchCANuZG4IBHRlc3QIBWRhdmlkCANLRVkI |
| 51 | CH9FHBjSA70//QD9Jv0A/g8yMDI0MDYyMlQxODE4MjD9AP8PMjA0NDA2MTdUMTgx |
| 52 | ODIwF0cwRQIhAPqG+GtIQlbcgB9ZFAGCKcO7DBMK+K3RinEAbzqKpFTcAiAp+D8L |
| 53 | z/S6nPNtSTGBBxr4cdUecjIHxKN6DoP3K1o2yg== |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 54 | |
Davide Pesavento | dd0724b | 2022-04-18 00:30:05 -0400 | [diff] [blame] | 55 | Print the NDN testbed root certificate in human-readable format:: |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 56 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 57 | $ curl -A ndnsec -fsLS https://named-data.net/ndnsec/ndn-testbed-root.ndncert.x3.base64 | ndnsec cert-dump -fp - |
Davide Pesavento | dd0724b | 2022-04-18 00:30:05 -0400 | [diff] [blame] | 58 | Certificate Name: |
| 59 | /ndn/KEY/%EC%F1L%8EQ%23%15%E0/ndn/%FD%00%00%01u%E6%7F2%10 |
| 60 | Additional Description: |
| 61 | fullname: NDN Testbed Root X3 |
| 62 | Public Key: |
| 63 | Key Type: 256-bit EC |
| 64 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEGx+3Y4FvYo1eScIvgD74lQhQdzN4 |
| 65 | zq021dop8t7kGfEpfGdKf2HGpnn4/qoF9iJ1yUZE/7Na8zzO4xT6RpIM0Q== |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 66 | Validity: |
Davide Pesavento | dd0724b | 2022-04-18 00:30:05 -0400 | [diff] [blame] | 67 | Not Before: 2020-11-20T16:31:37 |
| 68 | Not After: 2024-12-31T23:59:59 |
| 69 | Signature Information: |
| 70 | Signature Type: SignatureSha256WithEcdsa |
| 71 | Key Locator: Name=/ndn/KEY/%EC%F1L%8EQ%23%15%E0 |
| 72 | Self-Signed: yes |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 73 | |
| 74 | See Also |
| 75 | -------- |
| 76 | |
| 77 | :manpage:`ndnsec-cert-install(1)`, |
| 78 | :manpage:`ndnsec-export(1)` |