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 | |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 7 | **ndnsec-export** [**-h**] [**-o** *file*] [**-P** *passphrase*] |
| 8 | [**-i**\|\ **-k**\|\ **-c**] *name* |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 9 | |
| 10 | Description |
| 11 | ----------- |
| 12 | |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 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. |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 15 | The resulting file can be imported again using :program:`ndnsec-import`. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 16 | |
| 17 | Options |
| 18 | ------- |
| 19 | |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 20 | .. option:: -i, --identity |
| 21 | |
| 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 | |
| 25 | .. option:: -k, --key |
| 26 | |
| 27 | Interpret *name* as a key name. The default certificate of the key will be exported. |
| 28 | |
| 29 | .. option:: -c, --cert |
| 30 | |
| 31 | Interpret *name* as a certificate name. |
| 32 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 33 | .. option:: -o <file>, --output <file> |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 34 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 35 | Write to the specified output file instead of the standard output. |
Junxiao Shi | 476200b | 2017-10-05 12:16:27 +0000 | [diff] [blame] | 36 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 37 | .. option:: -P <passphrase>, --password <passphrase> |
Alexander Afanasyev | 634a62b | 2018-06-15 16:55:26 -0400 | [diff] [blame] | 38 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 39 | Passphrase to use for the export. If empty or not specified, the user is |
| 40 | interactively asked to type the passphrase on the terminal. Note that |
| 41 | specifying the passphrase via this option is insecure, as it can potentially |
| 42 | 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] | 43 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 44 | Example |
| 45 | ------- |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 46 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 47 | Export an identity's default certificate and private key into a file:: |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 48 | |
Junxiao Shi | 476200b | 2017-10-05 12:16:27 +0000 | [diff] [blame] | 49 | $ ndnsec-export -o alice.ndnkey /ndn/test/alice |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 50 | |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 51 | Export a specific certificate and its private key to the standard output:: |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 52 | |
Junxiao Shi | bc2e78e | 2020-05-20 15:01:08 -0600 | [diff] [blame] | 53 | $ ndnsec-export -c /ndn/edu/ucla/alice/KEY/1%5D%A7g%90%B2%CF%AA/self/%FD%00%00%01r-%D3%DC%2A |