Importing a Key Certificate

After obtaining a key certificate, use the AKT tool to import the key certificate to the development environment and operating environment as the running user.

For details about other operations on the key certificate, see Uninstalling the Key Certificate and Importing a Key Certificate Configuration File.

Syntax

akt [--private_key %s] [--public_cert %s] [--ca_cert %s] [--ca2_cert %s] ... [--ca14_cert %s]

Description

Imports a key certificate.

  • The number of certificate levels is configurable, ranging from 2 levels (including only the device certificate and root certificate) to 15 levels (including the device certificate, root certificate, and level-2 to level-14 certificates).
  • The system time of the development environment and operating environment must be within the validity period of the certificate.

Options

For details, see Command-Line Options of AKT.

Example

Run the following command in the directory where the key certificate is stored:

  • Development environment

    akt --private_key host-key.pem --public_cert host-cert.pem --ca_cert ca-cert.pem

  • Operating environment

    akt --private_key device-key.pem --public_cert device-cert.pem --ca_cert ca-cert.pem

Example description:

In the example command, the private key file name is host-key.pem or device-key.pem, the device certificate file name is host-cert.pem or device-cert.pem, and the root certificate file name is ca-cert.pem. After the command is executed, the message "Enter Password: " is displayed, and you need to enter the password for encrypting the private key (the password must be the same as that used for generating the private key) and enter the password again. If the message "Load cert, password, and key successfully." is displayed at the end, the certificate is successfully imported.

Precautions

  1. Ensure that the private key and certificate match each other. Otherwise, the import may fail.
  1. The password is entered in interactive mode and is not displayed in plaintext. The password is a string of 8 to 15 characters and must contain at least two types of the following: uppercase letters, lowercase letters, digits, and special characters.
  2. When importing the key certificate, ensure that the password entered for the first time is the same as the encryption password used for generating the private key.