pki import sm2-key-pair key-name der file-name [ exportable ]
pki import sm2-key-pair key-name pem file-name [ exportable ] [ password password ]
| 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 quoted by 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 set by the pki export sm2-key-pair command. | The value must be the existing decryption password of the SM2 key pair. |
Usage Scenario
Run this command to use the SM2 key pairs generated by other entities.
Prerequisites
The RSA 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. The SM2 key pair is named key-1 in the system with 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.