pki import sm2-key-pair key-name der file-name [ exportable ]
pki import sm2-key-pair key-name pem file-name [ exportable ] [ password password | ]
pki importsm2-key-pairkey-namepemfile-name [ exportable ] signkeykey-name [ certificatecertificate-name ]
Parameter |
Description |
Value |
|---|---|---|
key-name |
Specifies the name of the SM2 key pair to be imported on the device. |
The value is a string of 1 to 64 characters and case-sensitive without spaces or question marks (?). If the character string is enclosed in double quotation marks (" "), the character string can contain spaces and question marks. |
der file-name |
Specifies the format of the imported SM2 key pair as DER, and specifies the name of the file that stores the SM2 key pair. |
The value must be an existing SM2 key pair name. |
pem file-name |
Specifies the format of the SM2 key pair to be imported as PEM, and specifies the name of the file that stores the SM2 key pair. |
The value must be an existing SM2 key pair name. |
exportable |
Specifies the imported SM2 key pair as exportable. |
- |
password password |
Specifies the decryption password of the SM2 key pair. The decryption password is the same as the password configured using the pki export sm2-key-pair command. |
The value must be the existing decryption password of the SM2 key pair file. |
signkey key-name |
Specifies the name of a signature key pair. |
- |
certificate certificate-name |
Specifies the file name of an encryption certificate. |
- |
Usage Scenario
Run this command to use the SM2 key pairs generated by other entities.
Prerequisites
The SM2 key pair must already exist on the storage device.
Precautions
<sysname> cd pki <sysname> cd public/
# Import the SM2 key pair aaa.pem in the PEM format. In the system, the SM2 key pair is named key-1, has the decryption password Admin@1234, and is marked exportable.
<sysname> system-view [sysname] pki import sm2-key-pair key-1 pem aaa.pem exportable password Admin@1234 Info: Succeeded in importing SM2 key pair in PEM format.