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 | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 7 | **ndnsec-export** [**-h**] [**-o** *file*] [**-P** *passphrase*] *identity* |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 8 | |
| 9 | Description |
| 10 | ----------- |
| 11 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 12 | :program:`ndnsec-export` exports the default certificate of *identity* and its |
| 13 | private key to a file. It will ask for a passphrase to encrypt the private key. |
| 14 | The resulting file can be imported again using :program:`ndnsec-import`. |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 15 | |
| 16 | Options |
| 17 | ------- |
| 18 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 19 | .. option:: -o <file>, --output <file> |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 20 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 21 | Write to the specified output file instead of the standard output. |
Junxiao Shi | 476200b | 2017-10-05 12:16:27 +0000 | [diff] [blame] | 22 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 23 | .. option:: -P <passphrase>, --password <passphrase> |
Alexander Afanasyev | 634a62b | 2018-06-15 16:55:26 -0400 | [diff] [blame] | 24 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 25 | Passphrase to use for the export. If empty or not specified, the user is |
| 26 | interactively asked to type the passphrase on the terminal. Note that |
| 27 | specifying the passphrase via this option is insecure, as it can potentially |
| 28 | 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] | 29 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 30 | Example |
| 31 | ------- |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 32 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 33 | Export an identity's default certificate and private key into a file:: |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 34 | |
Junxiao Shi | 476200b | 2017-10-05 12:16:27 +0000 | [diff] [blame] | 35 | $ ndnsec-export -o alice.ndnkey /ndn/test/alice |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 36 | |
Davide Pesavento | b310efb | 2019-04-11 22:10:24 -0400 | [diff] [blame] | 37 | Export an identity's default certificate and private key to the standard output:: |
Alexander Afanasyev | 151a855 | 2014-04-11 00:54:43 -0700 | [diff] [blame] | 38 | |
| 39 | $ ndnsec-export /ndn/test/alice |