blob: 19394aff9a4a6d53823bb95043fda515346a445c [file] [log] [blame]
Alexander Afanasyev151a8552014-04-11 00:54:43 -07001ndnsec-import
2=============
3
Davide Pesaventob310efb2019-04-11 22:10:24 -04004Synopsis
5--------
Alexander Afanasyev151a8552014-04-11 00:54:43 -07006
Davide Pesavento102f0572024-06-22 15:00:06 -04007**ndnsec import** [**-h**] [**-P** *passphrase*] *file*
Alexander Afanasyev151a8552014-04-11 00:54:43 -07008
9Description
10-----------
11
Davide Pesavento102f0572024-06-22 15:00:06 -040012Import a certificate and its private key from a file in **SafeBag** format.
13The command will interactively ask for a passphrase to be used for decrypting the private key.
14If *file* is "-", the **SafeBag** data will be read from the standard input.
Davide Pesaventob310efb2019-04-11 22:10:24 -040015
Davide Pesavento102f0572024-06-22 15:00:06 -040016:program:`ndnsec-export` can be used to create a file in the expected format.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070017
18Options
19-------
20
Davide Pesaventob310efb2019-04-11 22:10:24 -040021.. option:: -P <passphrase>, --password <passphrase>
Junxiao Shi476200b2017-10-05 12:16:27 +000022
Davide Pesavento102f0572024-06-22 15:00:06 -040023 Passphrase to use for decryption. If empty or not specified, the user is
Davide Pesaventob310efb2019-04-11 22:10:24 -040024 interactively asked to type the passphrase on the terminal. Note that
25 specifying the passphrase via this option is insecure, as it can potentially
26 end up in the shell's history, be visible in :command:`ps` output, and so on.
Alexander Afanasyev634a62b2018-06-15 16:55:26 -040027
Davide Pesavento102f0572024-06-22 15:00:06 -040028Examples
29--------
Alexander Afanasyev151a8552014-04-11 00:54:43 -070030
Davide Pesaventob310efb2019-04-11 22:10:24 -040031Import a certificate and private key from a file::
Alexander Afanasyev151a8552014-04-11 00:54:43 -070032
Davide Pesavento102f0572024-06-22 15:00:06 -040033 $ ndnsec import alice.ndnkey
34
35See Also
36--------
37
38:manpage:`ndnsec-cert-install(1)`,
39:manpage:`ndnsec-export(1)`