blob: 04e01075c6e3c40a422d57c142d523ad4c5314e2 [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)**
14or from a file, and prints it on the standard output.
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 Pesaventob310efb2019-04-11 22:10:24 -040047Dump a certificate in human-readable format::
Alexander Afanasyev151a8552014-04-11 00:54:43 -070048
Alexander Afanasyev35109a12017-01-04 15:39:06 -080049 $ ndnsec-cert-dump -p /ndn/test/david/KEY/ksk-1396913058196/ID-CERT/%00%00%01E%3E%9D%A0%DE
Alexander Afanasyev151a8552014-04-11 00:54:43 -070050 Certificate name:
Alexander Afanasyev35109a12017-01-04 15:39:06 -080051 /ndn/test/david/KEY/ksk-1396913058196/ID-CERT/%00%00%01E%3E%9D%A0%DE
Alexander Afanasyev151a8552014-04-11 00:54:43 -070052 Validity:
53 NotBefore: 20140401T000000
54 NotAfter: 20150331T235959
55 Subject Description:
56 2.5.4.41: David
57 2.5.4.10: Some Organization
58 Public key bits:
59 MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEAtLq50tpynJ15zExEh9l6
60 jvh/HOmwhOppr/hTEPYUn2VTh21+JJIg5pHAAH/DQr8Bq5BGrdDUCIShxSxbaHwu
61 a1y4XgKP1MYBQP/WzcIhIzB/3PBDdmE0jM3Qg6yuk8BOwett3C07GtwW9dfgacwt
62 aC29xIHnYKfryH/gBSIDUIb38M7ILIDgQeIiQcHGHoFO8CbDtKY2OvVkFNgxowAR
63 Xn+gtkIfMdE77Z8p0S21pYfdvPuIpVVLy7lnFdwGzyCi3nmbtd/r9NSTepBczWQz
64 zBbThT7yfeNyHWLu0PZPdz84UpNPsBad3Bx9tT31noIVnt8yyBEfEU1jyEIVkm8U
65 VQIB