430
•
If the PKI domain has both the CA certificate and local certificates, you get the following results:
If you specify a file name, each local certificate is exported to a separate file with their
associated CA certificate chain.
If you do not specify a file name, the local certificates and CA certificate or CA certificate
chain are displayed on the monitor screen, separated by system prompts.
When you export all certificates in PKCS12 format, the PKI domain must have a local certificate.
Otherwise, the export operation fails.
When you export the local certificates or all certificates in PEM format, you must specify the
cryptographic algorithm and the challenge password for the private key. Otherwise, this command
does not export the private keys of the local certificates. If you specify the cryptographic algorithm
and the password, and the local certificates have their private keys, this command can export the
local certificates with their private keys. If the local certificates do not have their private keys, the
export operation fails.
When you export the local certificates, if the key pair in the PKI domain is changed and no longer
matches the key in the local certificates, the export operation fails.
When you export the local certificates or all certificates, if the PKI domain has two local certificates,
failure of exporting one local certificate does not affect export of the other.
The specified file name can contain an absolute path. If the specified path does not exist, the export
operation fails.
Examples
# Export the CA certificate in the PKI domain to a file named
cert-ca.der
in DER format.
<Sysname> system-view
[Sysname] pki export domain domain1 der ca filename cert-ca.der
# Export the local certificates in the PKI domain to a file named
cert-lo.der
in DER format.
<Sysname> system-view
[Sysname] pki export domain domain1 der local filename cert-lo.der
# Export all certificates in the PKI domain to a file named
cert-all.p7b
in DER format.
<Sysname> system-view
[Sysname] pki export domain domain1 der all filename cert-all.p7b
# Export the CA certificate in the PKI domain to a file named
cacert
in PEM format.
<Sysname> system-view
[Sysname] pki export domain domain1 pem ca filename cacert
# Export the local certificates and their private keys in the PKI domain to a file named
local.pem
in
PEM format. For the private keys, the cryptographic algorithm is DES_CBC and the password is 111.
<Sysname> system-view
[Sysname] pki export domain domain1 pem local des-cbc 111 filename local.pem
# Export the all certificates in the PKI domain to a file named
all.pem
in PEM format. No
cryptographic algorithm or password is specified, and the private keys are not exported.
<Sysname> system-view
[Sysname] pki export domain domain1 pem all filename all.pem
# Display the local certificates and their private keys in the PKI domain on the monitor screen
in PEM
format. For the private keys, the cryptographic algorithm is DES_CBC and the password is 111.
<Sysname> system-view
[Sysname] pki export domain domain1 pem local des-cbc 111
%The signature usage local certificate:
Bag Attributes