blob: 0a66d9b0263d3cdaffdc8cb31154a0765ef34d2f [file] [log] [blame]
Alexander Afanasyev151a8552014-04-11 00:54:43 -07001ndnsec-cert-dump
2================
3
4``ndnsec-cert-dump`` is a tool to dump a certificate from **Public Info Base** or file and output
5it to standard output.
6
7Usage
8-----
9
10::
11
12 $ ndnsec-cert-dump [-h] [-p] [-ikf] name
13
14Description
15-----------
16
17``ndnsec-cert-dump`` can read a certificate from **Public Info Base (PIB)** or a file and output
18the certificate to standard output.
19
20By default, ``name`` is interpreted as a certificate name.
21
22Options
23-------
24
25``-i``
26 Interpret ``name`` as an identity name. If specified, the certificate to dump is the default
27 certificate of the identity.
28
29``-k``
30 Interpret ``name`` as a key name. If specified, the certificate to dump is the default certificate
31 of the key.
32
33``-f``
34 Interpret ``name`` as a path to a file containing the certificate. If ``name`` is ``-``,
35 certificate will be read from standard input.
36
37``-p``
38 Print out the certificate to a human-readable format.
39
40Examples
41--------
42
43Dump a certificate from PIB to standard output:
44::
45
Alexander Afanasyev35109a12017-01-04 15:39:06 -080046 $ 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 -070047
48Dump a certificate to a human-readable format:
49::
50
Alexander Afanasyev35109a12017-01-04 15:39:06 -080051 $ 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 -070052 Certificate name:
Alexander Afanasyev35109a12017-01-04 15:39:06 -080053 /ndn/test/david/KEY/ksk-1396913058196/ID-CERT/%00%00%01E%3E%9D%A0%DE
Alexander Afanasyev151a8552014-04-11 00:54:43 -070054 Validity:
55 NotBefore: 20140401T000000
56 NotAfter: 20150331T235959
57 Subject Description:
58 2.5.4.41: David
59 2.5.4.10: Some Organization
60 Public key bits:
61 MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEAtLq50tpynJ15zExEh9l6
62 jvh/HOmwhOppr/hTEPYUn2VTh21+JJIg5pHAAH/DQr8Bq5BGrdDUCIShxSxbaHwu
63 a1y4XgKP1MYBQP/WzcIhIzB/3PBDdmE0jM3Qg6yuk8BOwett3C07GtwW9dfgacwt
64 aC29xIHnYKfryH/gBSIDUIb38M7ILIDgQeIiQcHGHoFO8CbDtKY2OvVkFNgxowAR
65 Xn+gtkIfMdE77Z8p0S21pYfdvPuIpVVLy7lnFdwGzyCi3nmbtd/r9NSTepBczWQz
66 zBbThT7yfeNyHWLu0PZPdz84UpNPsBad3Bx9tT31noIVnt8yyBEfEU1jyEIVkm8U
67 VQIB