< Home

Installing the Local Certificate

Context

The downloaded local certificate must be imported into the device memory to take effect. The device will store the imported certificate file to the ca_config.ini file in the default directory and automatically load the certificate file after restarting.

Before importing a certificate or key pair, ensure that the certificate or key pair is stored in the specified directory (public directory on the root system and vsys directory on the virtual system). For example, the certificate or key pair is in the public directory of the root system:
<sysname> cd pki
<sysname> cd public/

Prerequisites

The local certificate has been downloaded, and the certificate file has been stored to the device storage.

To prevent a failure to install the local certificate, ensure that the certificate file size does not exceed 1 MB.

By default, the preset local certificate is imported to the default domain. Therefore, other local certificates cannot be imported to the default domain. Otherwise, the preset local certificate will be invalid.

In dual-node hot standby scenarios, the master node backs up certificates to the backup node. The backup node does not support the function of importing certificates to the memory.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run pki import-certificate local [ [ realm realm-name ] { der | pkcs12 | pem } ] filename filename [ no-check-validate ] [ no-check-hash-alg ]

    Or run pki import-certificate local realm realm-name { der | pkcs12 | pem } filename filename replace [ no-check-validate ] [ no-check-hash-alg ]

    Or run pki import-certificate local realm realm-name { der | pkcs12 | pem } filename filename no-check-same-name

    The local certificate is imported into the device memory.

    A key pair file may be included in a certificate file or exist independently of the certificate file. The methods of importing a key pair file vary accordingly:

    If you do not know the format of the certificate you want to import, configure each format in turn and check whether the certificate is successfully imported. If no certificate format is specified, the system automatically detects the certificate format and imports the certificate.

  3. (Optional) Run pki set-certificate expire-prewarning day

    The expiration prewarning time of the local certificate in the device memory is configured.

    The default expiration prewarning time of the local certificate in the device memory is seven days.

Follow-up Procedure

  • To copy the local certificate to another device, run the pki export-certificate local realm realm-name { pem | pkcs12 } command to export the local certificate into the storage medium of the device. The local certificate then can be obtained through FTP or SFTP.

  • To copy a default built-in local certificate to another device, run the pki export-certificate default local filename filename command to export the default built-in local certificate into the storage medium of the device. The local certificate then can be obtained through FTP or SFTP.

Verifying the Configuration

Run the display pki certificate local [ realm realm-name | filename filename ] command to check the loaded local certificate.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >