blob: 4d7e27706fd6812c7a4faed767e613ab22413d93 [file] [log] [blame]
Alexander Afanasyev151a8552014-04-11 00:54:43 -07001ndnsec-export
2=============
3
Davide Pesaventob310efb2019-04-11 22:10:24 -04004Synopsis
5--------
Alexander Afanasyev151a8552014-04-11 00:54:43 -07006
Davide Pesaventob310efb2019-04-11 22:10:24 -04007**ndnsec-export** [**-h**] [**-o** *file*] [**-P** *passphrase*] *identity*
Alexander Afanasyev151a8552014-04-11 00:54:43 -07008
9Description
10-----------
11
Davide Pesaventob310efb2019-04-11 22:10:24 -040012:program:`ndnsec-export` exports the default certificate of *identity* and its
13private key to a file. It will ask for a passphrase to encrypt the private key.
14The resulting file can be imported again using :program:`ndnsec-import`.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070015
16Options
17-------
18
Davide Pesaventob310efb2019-04-11 22:10:24 -040019.. option:: -o <file>, --output <file>
Alexander Afanasyev151a8552014-04-11 00:54:43 -070020
Davide Pesaventob310efb2019-04-11 22:10:24 -040021 Write to the specified output file instead of the standard output.
Junxiao Shi476200b2017-10-05 12:16:27 +000022
Davide Pesaventob310efb2019-04-11 22:10:24 -040023.. option:: -P <passphrase>, --password <passphrase>
Alexander Afanasyev634a62b2018-06-15 16:55:26 -040024
Davide Pesaventob310efb2019-04-11 22:10:24 -040025 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 Afanasyev151a8552014-04-11 00:54:43 -070029
Davide Pesaventob310efb2019-04-11 22:10:24 -040030Example
31-------
Alexander Afanasyev151a8552014-04-11 00:54:43 -070032
Davide Pesaventob310efb2019-04-11 22:10:24 -040033Export an identity's default certificate and private key into a file::
Alexander Afanasyev151a8552014-04-11 00:54:43 -070034
Junxiao Shi476200b2017-10-05 12:16:27 +000035 $ ndnsec-export -o alice.ndnkey /ndn/test/alice
Alexander Afanasyev151a8552014-04-11 00:54:43 -070036
Davide Pesaventob310efb2019-04-11 22:10:24 -040037Export an identity's default certificate and private key to the standard output::
Alexander Afanasyev151a8552014-04-11 00:54:43 -070038
39 $ ndnsec-export /ndn/test/alice