Got it

Import certificate

Created: May 29, 2020 14:39:44Latest reply: May 29, 2020 14:41:19 545 1 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hello team,

Please advise how to import the certificate to AC and what kind or the format is good for the AC such as crt, pfx, p7b, pem and etc.

Thanks.

Featured Answers
Popeye_Wang
Admin Created May 29, 2020 14:41:19

Hi,

The certificates and private key file in DER or PEM format are separated. When they are imported, only the file name extension is different and other parameters are the same. If the CA provides two CA certificates rootca.pem and middleca.pem, local certificate localcert.pem, and private key file local_privatekey.pem in PEM format, and they need to be imported to the PKI domain named test, perform the following procedures:

1. Import CA certificates one by one. You can run the display pki certificate ca realm test command to view the imported certificates.

[HUAWEI] pki import-certificate ca realm test pem filename rootca.pem

[HUAWEI] pki import-certificate ca realm test pem filename middleca.pem

2. Import the local certificate. You can run the display pki certificate local realm test command to view the imported certificate.

[HUAWEI] pki import-certificate local realm test pem filename localcert.pem

3. Import the private key file. If the CA provides a private key file, import the private key file. Otherwise, skip this step and assume that the password is set to Admin@123. You can run the display pki rsa local-key-pair name test public command to view the imported file.

[HUAWEI] pki import rsa-key-pair test pem local_privatekey.pem password Admin@123

4. Check whether the imported certificate matches the private key. If no matching key pair is found, check whether the imported file is correct.

[HUAWEI] pki match-rsa-key certificate-filename localcert.pem

Info: The file localcert.pem contains certificates 1.

Info: Certificate 1 from file localcert.pem matches RSA key test.

The certificates and private key file in PKCS12 format are in the same file. If the CA provides two CA certificates rootca.pem and middleca.pem, local certificate, and private key file localcert.p12 in PKCS12 format, and they need to be imported to the PKI domain named test, perform the following procedures:

1. Import CA certificates one by one. You can run the display pki certificate ca realm test command to view the imported certificates.

[HUAWEI] pki import-certificate ca realm test pem filename rootca.pem

[HUAWEI] pki import-certificate ca realm test pem filename middleca.pem

2. Import the local certificate. You can run the display pki certificate local realm test command to view the imported certificate.

[HUAWEI] pki import-certificate local realm test pkcs12 filename localcert.p12

3. Import the private key file. If the CA provides a private key file, import the private key file. Otherwise, skip this step and assume that the password is set to Admin@123. You can run the display pki rsa local-key-pair name test public command to view the imported file.

[HUAWEI] pki import rsa-key-pair test pkcs12 localcert.p12 password Admin@123

4. Check whether the imported certificate matches the private key. If no matching key pair is found, check whether the imported file is correct.

[HUAWEI] pki match-rsa-key certificate-filename localcert_local.cer

Info: The file localcert_local.cer contains certificates 1.                                                                        

Info: Certificate 1 from file localcert_local.cer matches RSA key test.

View more
  • x
  • convention:

All Answers

Hi,

The certificates and private key file in DER or PEM format are separated. When they are imported, only the file name extension is different and other parameters are the same. If the CA provides two CA certificates rootca.pem and middleca.pem, local certificate localcert.pem, and private key file local_privatekey.pem in PEM format, and they need to be imported to the PKI domain named test, perform the following procedures:

1. Import CA certificates one by one. You can run the display pki certificate ca realm test command to view the imported certificates.

[HUAWEI] pki import-certificate ca realm test pem filename rootca.pem

[HUAWEI] pki import-certificate ca realm test pem filename middleca.pem

2. Import the local certificate. You can run the display pki certificate local realm test command to view the imported certificate.

[HUAWEI] pki import-certificate local realm test pem filename localcert.pem

3. Import the private key file. If the CA provides a private key file, import the private key file. Otherwise, skip this step and assume that the password is set to Admin@123. You can run the display pki rsa local-key-pair name test public command to view the imported file.

[HUAWEI] pki import rsa-key-pair test pem local_privatekey.pem password Admin@123

4. Check whether the imported certificate matches the private key. If no matching key pair is found, check whether the imported file is correct.

[HUAWEI] pki match-rsa-key certificate-filename localcert.pem

Info: The file localcert.pem contains certificates 1.

Info: Certificate 1 from file localcert.pem matches RSA key test.

The certificates and private key file in PKCS12 format are in the same file. If the CA provides two CA certificates rootca.pem and middleca.pem, local certificate, and private key file localcert.p12 in PKCS12 format, and they need to be imported to the PKI domain named test, perform the following procedures:

1. Import CA certificates one by one. You can run the display pki certificate ca realm test command to view the imported certificates.

[HUAWEI] pki import-certificate ca realm test pem filename rootca.pem

[HUAWEI] pki import-certificate ca realm test pem filename middleca.pem

2. Import the local certificate. You can run the display pki certificate local realm test command to view the imported certificate.

[HUAWEI] pki import-certificate local realm test pkcs12 filename localcert.p12

3. Import the private key file. If the CA provides a private key file, import the private key file. Otherwise, skip this step and assume that the password is set to Admin@123. You can run the display pki rsa local-key-pair name test public command to view the imported file.

[HUAWEI] pki import rsa-key-pair test pkcs12 localcert.p12 password Admin@123

4. Check whether the imported certificate matches the private key. If no matching key pair is found, check whether the imported file is correct.

[HUAWEI] pki match-rsa-key certificate-filename localcert_local.cer

Info: The file localcert_local.cer contains certificates 1.                                                                        

Info: Certificate 1 from file localcert_local.cer matches RSA key test.

View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.