pki import sm2-key-pair rsa-key-pair

Function

The pki import sm2-key-pair command imports an SM2 key pair to the memory in manual update mode.

The pki import rsa-key-pair command imports an RSA key pair to the memory in manual update mode.

Format

pki import { sm2-key-pair | rsa-key-pair } keypair-name der key-filename

pki import { sm2-key-pair | rsa-key-pair } keypair-name pem key-filename password password

Parameters

Parameter Description Value
keypair-name

Specifies the name of an SM2 or RSA key pair.

The value is a string of 1 to 31 characters.

der key-filename

Specifies the name of a DER private key file.

The value is a string of 1 to 63 characters.

pem key-filename

Specifies the name of a PEM private key file.

The value is a string of 1 to 63 characters.

password password

Specifies the password of a PEM private key file.

The password must contain at least two types of the following characters: uppercase letters, lowercase letters, digits, and special characters. The password must contain at least eight characters.

The value is a string of 1 to 31 case-sensitive characters in plain text or 20 to 432 case-sensitive characters in ciphertext.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
pki execute

Usage Guidelines

Usage Scenario

The SM2 or RSA key pair obtained offline takes effect only after being imported to the memory.

Ensure that the size of the SM2 or RSA certificate does not exceed 2 MB. Otherwise, the certificate fails to be imported.

Updating the key every 90 days is recommended.

Example

# Import the SM2 key pair named keypair1.
<HUAWEI> system-view
[~HUAWEI] pki import sm2-key-pair keypair1 der keyfile1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >