Previous Topic: delete OptionNext Topic: findAlias Option


export Option

Exports an existing certificate or a private key from the smkeydatabase to a file. Certificate data is exported using PEM encoding. Private key data is exported using DER encoded PKCS8 format.

Arguments for the -export option are as follows:

-alias <alias>

Required. Identifies the certificate or key to be exported.

-outfile <out_file>

Required. Specifies the full path to the output file for the exported certificate or key.

-type (key|cert)

Optional. Indicates whether a certificate or key is being exported. If no option is specified, a certificate is the default.

-password <password>

Required only when exporting a private key. Specifies the password used to encrypt the private key at the time the key gets exported to a file. You do not need a password to export the certificate holding the public key because certificates are exported in clear text.

When a private key is exported, it gets exported to the output file in encrypted form using this password. To add this same private key back to the smkeydatabase, run the -addPrivKey command and use this password.