Skip to content

Commit 102f057

Browse files
committed
docs: ndnsec man pages improvements
* Add a "See Also" section to most pages * Streamline/clarify some sentences * Refresh a few examples Change-Id: I3e0b62ad01c06faac632a120cde22a8da472426e
1 parent 361e168 commit 102f057

13 files changed

+260
-188
lines changed

docs/manpages/ndnsec-cert-dump.rst

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ ndnsec-cert-dump
44
Synopsis
55
--------
66

7-
**ndnsec-cert-dump** [**-h**] [**-p**] [**-r** [**-H** *host*] [**-P** *port*]]
7+
**ndnsec cert-dump** [**-h**] [**-p**] [**-r** [**-H** *host*] [**-P** *port*]]
88
[**-i**\|\ **-k**\|\ **-f**] *name*
99

1010
Description
1111
-----------
1212

13-
:program:`ndnsec-cert-dump` reads a certificate from the **Public Info Base (PIB)**
14-
or from a file, and prints it on the standard output in Base64 encoding.
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.
1516

1617
By default, *name* is interpreted as a certificate name.
1718

@@ -37,16 +38,23 @@ Options
3738

3839
Print the certificate in a human-readable format.
3940

40-
Example
41-
-------
41+
Examples
42+
--------
4243

43-
Dump a certificate from PIB to standard output::
44+
Export a certificate from the local PIB to the standard output with Base64 encoding::
4445

45-
$ ndnsec-cert-dump /ndn/test/david/KEY/ksk-1396913058196/ID-CERT/%00%00%01E%3E%9D%A0%DE
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==
4654

4755
Print the NDN testbed root certificate in human-readable format::
4856

49-
$ curl -A ndnsec -fsLS https://named-data.net/ndnsec/ndn-testbed-root.ndncert.x3.base64 | ndnsec-cert-dump -fp -
57+
$ curl -A ndnsec -fsLS https://named-data.net/ndnsec/ndn-testbed-root.ndncert.x3.base64 | ndnsec cert-dump -fp -
5058
Certificate Name:
5159
/ndn/KEY/%EC%F1L%8EQ%23%15%E0/ndn/%FD%00%00%01u%E6%7F2%10
5260
Additional Description:
@@ -62,3 +70,9 @@ Print the NDN testbed root certificate in human-readable format::
6270
Signature Type: SignatureSha256WithEcdsa
6371
Key Locator: Name=/ndn/KEY/%EC%F1L%8EQ%23%15%E0
6472
Self-Signed: yes
73+
74+
See Also
75+
--------
76+
77+
:manpage:`ndnsec-cert-install(1)`,
78+
:manpage:`ndnsec-export(1)`

docs/manpages/ndnsec-cert-gen.rst

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ ndnsec-cert-gen
44
Synopsis
55
--------
66

7-
**ndnsec-cert-gen** [**-h**] [**-S** *timestamp*] [**-E** *timestamp*]
7+
**ndnsec cert-gen** [**-h**] [**-S** *timestamp*] [**-E** *timestamp*]
88
[**-I** *info*]... [**-s** *signer*] [**-i** *issuer*] *file*
99

1010
Description
1111
-----------
1212

13-
:program:`ndnsec-cert-gen` takes a signing request as input and issues an
14-
identity certificate for the key in the signing request. The signing request
15-
can be created with :program:`ndnsec-key-gen` and can be re-generated with
16-
:program:`ndnsec-sign-req`.
13+
This command takes a signing request as input and issues an identity certificate for
14+
the key contained in the signing request.
15+
A signing request is generated automatically by :program:`ndnsec-key-gen` for any new
16+
key, or it can be manually created for an existing key with :program:`ndnsec-sign-req`.
1717

18-
By default, the default key is used to sign the issued certificate.
18+
Unless specified otherwise, the default key is used to sign the issued certificate.
1919

20-
*file* is the name of a file that contains the signing request. If *file* is
21-
"-", the signing request is read from the standard input.
20+
*file* is the name of a file that contains the signing request.
21+
If *file* is "-", the signing request is read from the standard input.
2222

23-
The generated certificate is written to the standard output in base64 encoding.
23+
The generated certificate is written to the standard output in Base64 encoding.
2424

2525
Options
2626
-------
@@ -33,7 +33,7 @@ Options
3333
.. option:: -E <timestamp>, --not-after <timestamp>
3434

3535
Date and time when the certificate expires, in "YYYYMMDDhhmmss" format.
36-
The default value is 365 days after the **--not-before** timestamp.
36+
The default value is 365 days after the :option:`--not-before` timestamp.
3737

3838
.. option:: -I <info>, --info <info>
3939

@@ -57,12 +57,12 @@ Options
5757
Issuer's ID to be included in the issued certificate name. The default
5858
value is "NA".
5959

60-
Example
61-
-------
60+
Examples
61+
--------
6262

6363
::
6464

65-
$ ndnsec-cert-gen -S 20200501000000 -E 20210101000000 -I "affiliation Some Organization" -I "foobar Foo Bar" -i "Universe" -s /ndn/test request.cert > signed.cert
65+
$ ndnsec cert-gen -S 20200501000000 -E 20210101000000 -I "affiliation Some Organization" -I "foobar Foo Bar" -i "Universe" -s /ndn/test request.cert > signed.cert
6666

6767
$ cat signed.cert
6868
Bv0BcgctCAdleGFtcGxlCANLRVkICOQUmX8oloLrCAhVbml2ZXJzZQgJ/QAAAXHR
@@ -74,7 +74,7 @@ Example
7474
YXL9AgIHRm9vIEJhchdHMEUCIQDPT9Hq1kvkE0r9W1aYSBVTnHlTEzgtz+v1DwkC
7575
ug/vLAIgY3xJITCwf55sqey33q5GIQSk1TRCkNNl58ojvPs5sNU=
7676

77-
$ ndnsec-cert-dump -p -f signed.cert
77+
$ ndnsec cert-dump -p -f signed.cert
7878
Certificate Name:
7979
/example/KEY/%E4%14%99%7F%28%96%82%EB/Universe/%FD%00%00%01q%D1%02N%82
8080
Additional Description:
@@ -90,3 +90,11 @@ Example
9090
Signature Information:
9191
Signature Type: SignatureSha256WithEcdsa
9292
Key Locator: Name=/ndn/test/KEY/I%3FS%9A%28%BB%9A%95
93+
94+
See Also
95+
--------
96+
97+
:manpage:`ndnsec-cert-dump(1)`,
98+
:manpage:`ndnsec-cert-install(1)`,
99+
:manpage:`ndnsec-key-gen(1)`,
100+
:manpage:`ndnsec-sign-req(1)`

docs/manpages/ndnsec-cert-install.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ ndnsec-cert-install
44
Synopsis
55
--------
66

7-
**ndnsec-cert-install** [**-h**] [**-I**\|\ **-K**\|\ **-N**] *file*
7+
**ndnsec cert-install** [**-h**] [**-I**\|\ **-K**\|\ **-N**] *file*
88

99
Description
1010
-----------
1111

12-
:program:`ndnsec-cert-install` allows importing a certificate into the
13-
**Public Information Base (PIB)**. By default, the installed certificate
14-
will be set as the default certificate for the corresponding identity and
15-
the identity will be set as the user's default identity.
12+
This command allows importing a certificate into the **Public Information Base (PIB)**.
13+
By default, the installed certificate will be set as the default certificate for the
14+
corresponding identity and the identity will be set as the user's default identity.
1615

1716
*file* is a path to a file that contains the certificate to install.
1817
If *file* is "-", the certificate will be read from the standard input.
@@ -35,13 +34,20 @@ Options
3534

3635
Install the certificate but do not change any default settings.
3736

38-
Example
39-
-------
37+
Examples
38+
--------
4039

4140
Install a certificate and set it as the default certificate::
4241

43-
$ ndnsec-cert-install cert_file.cert
42+
$ ndnsec cert-install cert_file.cert
4443

4544
Install a certificate but do not change any default settings::
4645

47-
$ ndnsec-cert-install -N cert_file.cert
46+
$ ndnsec cert-install -N cert_file.cert
47+
48+
See Also
49+
--------
50+
51+
:manpage:`ndnsec-cert-dump(1)`,
52+
:manpage:`ndnsec-cert-gen(1)`,
53+
:manpage:`ndnsec-import(1)`

docs/manpages/ndnsec-delete.rst

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ ndnsec-delete
44
Synopsis
55
--------
66

7-
**ndnsec-delete** [**-h**] [**-k**\|\ **-c**] *name*
7+
**ndnsec delete** [**-h**] [**-k**\|\ **-c**] *name*
88

99
Description
1010
-----------
1111

12-
:program:`ndnsec-delete` allows to delete security data from both the
13-
**Public Info Base (PIB)** and the **Trusted Platform Module (TPM)**.
12+
This command allows deleting security data from both the
13+
**Public Information Base (PIB)** and the **Trusted Platform Module (TPM)**.
1414

15-
By default, :program:`ndnsec-delete` will interpret *name* as an identity name.
15+
By default, *name* is interpreted as an identity name.
1616
If an identity is deleted, all keys and certificates belonging to that identity
1717
will be deleted as well. If a key is deleted, all certificates associated with
1818
that key will be deleted as well.
@@ -33,11 +33,16 @@ Exit Status
3333

3434
Normally, the exit status is 0 if the requested entity is deleted successfully.
3535
If the entity to be deleted does not exist, the exit status is 1.
36-
For other errors, the exit status is 2.
36+
For any other errors, the exit status is 2.
3737

38-
Example
39-
-------
38+
Examples
39+
--------
40+
41+
Delete all data related to the identity ``/ndn/test/david``::
4042

41-
Delete all data related to an identity::
43+
$ ndnsec delete /ndn/test/david
44+
45+
See Also
46+
--------
4247

43-
$ ndnsec-delete /ndn/test/david
48+
:manpage:`ndnsec-list(1)`

docs/manpages/ndnsec-export.rst

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@ ndnsec-export
44
Synopsis
55
--------
66

7-
**ndnsec-export** [**-h**] [**-o** *file*] [**-P** *passphrase*]
7+
**ndnsec export** [**-h**] [**-o** *file*] [**-P** *passphrase*]
88
[**-i**\|\ **-k**\|\ **-c**] *name*
99

1010
Description
1111
-----------
1212

13-
:program:`ndnsec-export` exports a certificate from the **Public Info Base (PIB)** and
14-
its private key to a file. It will ask for a passphrase to encrypt the private key.
15-
The resulting file can be imported again using :program:`ndnsec-import`.
13+
Export a certificate from the local **Public Information Base (PIB)** and its private key to
14+
a file in **SafeBag** format.
15+
The command will interactively ask for a passphrase to be used for encrypting the private key.
16+
17+
The resulting file can be later imported using :program:`ndnsec-import`.
1618

1719
Options
1820
-------
1921

2022
.. option:: -i, --identity
2123

22-
Interpret *name* as an identity name. The default certificate of the identity will be exported.
23-
This is the default unless **-k** or **-c** is specified.
24+
Interpret *name* as an identity name.
25+
The default certificate of the identity will be exported.
26+
This is the default unless :option:`-k` or :option:`-c` is specified.
2427

2528
.. option:: -k, --key
2629

27-
Interpret *name* as a key name. The default certificate of the key will be exported.
30+
Interpret *name* as a key name.
31+
The default certificate of the key will be exported.
2832

2933
.. option:: -c, --cert
3034

@@ -36,18 +40,24 @@ Options
3640

3741
.. option:: -P <passphrase>, --password <passphrase>
3842

39-
Passphrase to use for the export. If empty or not specified, the user is
43+
Passphrase to use for encryption. If empty or not specified, the user is
4044
interactively asked to type the passphrase on the terminal. Note that
4145
specifying the passphrase via this option is insecure, as it can potentially
4246
end up in the shell's history, be visible in :command:`ps` output, and so on.
4347

44-
Example
45-
-------
48+
Examples
49+
--------
4650

47-
Export an identity's default certificate and private key into a file::
51+
Export an identity's default certificate and private key to a file::
4852

49-
$ ndnsec-export -o alice.ndnkey /ndn/test/alice
53+
$ ndnsec export -o alice.ndnkey /ndn/test/alice
5054

5155
Export a specific certificate and its private key to the standard output::
5256

53-
$ ndnsec-export -c /ndn/edu/ucla/alice/KEY/1%5D%A7g%90%B2%CF%AA/self/%FD%00%00%01r-%D3%DC%2A
57+
$ ndnsec export -c /ndn/edu/ucla/alice/KEY/1%5D%A7g%90%B2%CF%AA/self/%FD%00%00%01r-%D3%DC%2A
58+
59+
See Also
60+
--------
61+
62+
:manpage:`ndnsec-cert-dump(1)`,
63+
:manpage:`ndnsec-import(1)`

docs/manpages/ndnsec-get-default.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ ndnsec-get-default
44
Synopsis
55
--------
66

7-
**ndnsec-get-default** [**-h**] [**-k**\|\ **-c**] [**-i** *identity*\|\ **-K** *key*] [**-q**]
7+
**ndnsec get-default** [**-h**] [**-k**\|\ **-c**] [**-i** *identity*\|\ **-K** *key*]
8+
[**-q**]
89

910
Description
1011
-----------
1112

12-
Given a particular entity, :program:`ndnsec-get-default` shows its default settings
13-
according to the command-line options. By default, if neither **-i** nor **-K** is
14-
given, the command displays the default identity or the default key/certificate of
15-
the default identity.
13+
This command shows the default settings of the local **Public Information Base (PIB)**
14+
or those of a specific PIB identity or key.
15+
16+
By default, if neither :option:`-i` nor :option:`-K` is given, the command displays
17+
the default identity or the default key/certificate of the default identity.
1618

1719
Options
1820
-------
@@ -37,20 +39,26 @@ Options
3739

3840
Disable printing the trailing newline character.
3941

40-
Example
41-
-------
42+
Examples
43+
--------
4244

4345
Display an identity's default key name::
4446

45-
$ ndnsec-get-default -k -i /ndn/test/alice
47+
$ ndnsec get-default -k -i /ndn/test/alice
4648
/ndn/test/alice/ksk-1394129695025
4749

4850
Display an identity's default certificate name::
4951

50-
$ ndnsec-get-default -c -i /ndn/test/alice
52+
$ ndnsec get-default -c -i /ndn/test/alice
5153
/ndn/test/KEY/alice/ksk-1394129695025/ID-CERT/%FD%01D%98%9A%F2%3F
5254

5355
Display a key's default certificate name::
5456

55-
$ ndnsec-get-default -c -K /ndn/test/alice/ksk-1394129695025
57+
$ ndnsec get-default -c -K /ndn/test/alice/ksk-1394129695025
5658
/ndn/test/KEY/alice/ksk-1394129695025/ID-CERT/%FD%01D%98%9A%F2%3F
59+
60+
See Also
61+
--------
62+
63+
:manpage:`ndnsec-list(1)`,
64+
:manpage:`ndnsec-set-default(1)`

docs/manpages/ndnsec-import.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,36 @@ ndnsec-import
44
Synopsis
55
--------
66

7-
**ndnsec-import** [**-h**] [**-P** *passphrase*] *file*
7+
**ndnsec import** [**-h**] [**-P** *passphrase*] *file*
88

99
Description
1010
-----------
1111

12-
:program:`ndnsec-import` imports a certificate and its private key from a file
13-
created by :program:`ndnsec-export`. It will ask for the passphrase used to
14-
encrypt the private key.
12+
Import a certificate and its private key from a file in **SafeBag** format.
13+
The command will interactively ask for a passphrase to be used for decrypting the private key.
14+
If *file* is "-", the **SafeBag** data will be read from the standard input.
1515

16-
If *file* is "-", read from the standard input.
16+
:program:`ndnsec-export` can be used to create a file in the expected format.
1717

1818
Options
1919
-------
2020

2121
.. option:: -P <passphrase>, --password <passphrase>
2222

23-
Passphrase to use for the export. If empty or not specified, the user is
23+
Passphrase to use for decryption. If empty or not specified, the user is
2424
interactively asked to type the passphrase on the terminal. Note that
2525
specifying the passphrase via this option is insecure, as it can potentially
2626
end up in the shell's history, be visible in :command:`ps` output, and so on.
2727

28-
Example
29-
-------
28+
Examples
29+
--------
3030

3131
Import a certificate and private key from a file::
3232

33-
$ ndnsec-import alice.ndnkey
33+
$ ndnsec import alice.ndnkey
34+
35+
See Also
36+
--------
37+
38+
:manpage:`ndnsec-cert-install(1)`,
39+
:manpage:`ndnsec-export(1)`

0 commit comments

Comments
 (0)