blob: c5ca0d9d3f8d95e951d32604d01efa660e6de885 [file] [log] [blame]
Alexander Afanasyev151a8552014-04-11 00:54:43 -07001ndnsec-cert-dump
2================
3
Davide Pesaventob310efb2019-04-11 22:10:24 -04004Synopsis
5--------
Alexander Afanasyev151a8552014-04-11 00:54:43 -07006
Davide Pesaventob310efb2019-04-11 22:10:24 -04007**ndnsec-cert-dump** [**-h**] [**-p**] [**-r** [**-H** *host*] [**-P** *port*]]
8[**-i**\|\ **-k**\|\ **-f**] *name*
Alexander Afanasyev151a8552014-04-11 00:54:43 -07009
10Description
11-----------
12
Davide Pesaventob310efb2019-04-11 22:10:24 -040013:program:`ndnsec-cert-dump` reads a certificate from the **Public Info Base (PIB)**
Davide Pesaventodd0724b2022-04-18 00:30:05 -040014or from a file, and prints it on the standard output in Base64 encoding.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070015
Davide Pesaventob310efb2019-04-11 22:10:24 -040016By default, *name* is interpreted as a certificate name.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070017
18Options
19-------
20
Davide Pesaventob310efb2019-04-11 22:10:24 -040021.. option:: -i, --identity
Alexander Afanasyev151a8552014-04-11 00:54:43 -070022
Davide Pesaventob310efb2019-04-11 22:10:24 -040023 Interpret *name* as an identity name. If specified, the certificate to dump
24 is the default certificate of the identity.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070025
Davide Pesaventob310efb2019-04-11 22:10:24 -040026.. option:: -k, --key
Alexander Afanasyev151a8552014-04-11 00:54:43 -070027
Davide Pesaventob310efb2019-04-11 22:10:24 -040028 Interpret *name* as a key name. If specified, the certificate to dump is the
29 default certificate of the key.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070030
Davide Pesaventob310efb2019-04-11 22:10:24 -040031.. option:: -f, --file
Alexander Afanasyev151a8552014-04-11 00:54:43 -070032
Davide Pesaventob310efb2019-04-11 22:10:24 -040033 Interpret *name* as a path to a file containing the certificate. If *name*
34 is "-", the certificate will be read from the standard input.
35
36.. option:: -p, --pretty
37
38 Print the certificate in a human-readable format.
39
40Example
41-------
42
43Dump a certificate from PIB to standard output::
Alexander Afanasyev151a8552014-04-11 00:54:43 -070044
Alexander Afanasyev35109a12017-01-04 15:39:06 -080045 $ ndnsec-cert-dump /ndn/test/david/KEY/ksk-1396913058196/ID-CERT/%00%00%01E%3E%9D%A0%DE
Alexander Afanasyev151a8552014-04-11 00:54:43 -070046
Davide Pesaventodd0724b2022-04-18 00:30:05 -040047Print the NDN testbed root certificate in human-readable format::
Alexander Afanasyev151a8552014-04-11 00:54:43 -070048
Davide Pesaventodd0724b2022-04-18 00:30:05 -040049 $ curl -A ndnsec -fsLS https://named-data.net/ndnsec/ndn-testbed-root.ndncert.x3.base64 | ndnsec-cert-dump -fp -
50 Certificate Name:
51 /ndn/KEY/%EC%F1L%8EQ%23%15%E0/ndn/%FD%00%00%01u%E6%7F2%10
52 Additional Description:
53 fullname: NDN Testbed Root X3
54 Public Key:
55 Key Type: 256-bit EC
56 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEGx+3Y4FvYo1eScIvgD74lQhQdzN4
57 zq021dop8t7kGfEpfGdKf2HGpnn4/qoF9iJ1yUZE/7Na8zzO4xT6RpIM0Q==
Alexander Afanasyev151a8552014-04-11 00:54:43 -070058 Validity:
Davide Pesaventodd0724b2022-04-18 00:30:05 -040059 Not Before: 2020-11-20T16:31:37
60 Not After: 2024-12-31T23:59:59
61 Signature Information:
62 Signature Type: SignatureSha256WithEcdsa
63 Key Locator: Name=/ndn/KEY/%EC%F1L%8EQ%23%15%E0
64 Self-Signed: yes