Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 1 | ndnsec-export |
| 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 export** [**-h**] [**-o** *file*] [**-P** *passphrase*] |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 8 | [**-i**\|\ **-k**\|\ **-c**] *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 | 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`. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 18 | |
| 19 | Options |
| 20 | ------- |
| 21 | |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 22 | .. option:: -i, --identity |
| 23 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 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. |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 27 | |
| 28 | .. option:: -k, --key |
| 29 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 30 | Interpret *name* as a key name. |
| 31 | The default certificate of the key will be exported. |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 32 | |
| 33 | .. option:: -c, --cert |
| 34 | |
| 35 | Interpret *name* as a certificate name. |
| 36 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 37 | .. option:: -o <file>, --output <file> |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 38 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 39 | Write to the specified output file instead of the standard output. |
Junxiao Shi | 476200b | 2017-10-05 12:16:27 +0000 | [diff] [blame] | 40 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 41 | .. option:: -P <passphrase>, --password <passphrase> |
Alexander Afanasyev | 634a62b | 2018-06-15 16:55:26 -0400 | [diff] [blame] | 42 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 43 | Passphrase to use for encryption. If empty or not specified, the user is |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 44 | interactively asked to type the passphrase on the terminal. Note that |
| 45 | specifying the passphrase via this option is insecure, as it can potentially |
| 46 | end up in the shell's history, be visible in :command:`ps` output, and so on. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 47 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 48 | Examples |
| 49 | -------- |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 50 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 51 | Export an identity's default certificate and private key to a file:: |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 52 | |
Davide Pesavento | 102f057 | 2024-06-22 15:00:06 -0400 | [diff] [blame] | 53 | $ ndnsec export -o alice.ndnkey /ndn/test/alice |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 54 | |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 55 | Export a specific certificate and its private key to the standard output:: |
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 | $ 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)` |