Huawei App Signing for an app, where I have to Open CLI and then go to JDK directory

380 views Asked by At

enter image description herehow to access the directory and export to pem format. As there is no help avaliable on the internet.

1

There are 1 answers

1
KirubaPradeep On

Please find the detailed explanation below to execute the command.

  1. Open the CLI. ==> Open command line interface (CLI) using the following method

a. In windows:

i. Press windows + R

ii. Type “cmd” and press enter

b. In Linux:

i. Press ctrl + Alt + T
  1. Go to the directory where the JDK is located by typing the below command:

cd

Note: may be different in Linux environment. Then it will go to the path where JDK is located. 3. run the following command to export the certificate (in PEM format) for the new upload key

keytool -export -rfc -keystore upload-keystore.jks -alias upload -file upload_certificate.pem

Replace the italic and boldfaced content in the command with the actual values

a. upload-keystore.jks ==> replace with “/”

example: “D:\keystore\mykeystore.jks”

b. upload ==> replace with alias of jks file which is given while creating jks file

example: mykeystorealias

c. upload_certificate.pem ==> replace with “/name-of-pem-file” (path and name of the pem file where you want to create pem file)

example: "D:\keystore\my-pem-certificate.pem"

After replacing the required values in the above command. It will look like below:

keytool -export -rfc -keystore "D:\keystore\mykeystore.jks" -alias mykeystorealias -file "D:\keystore\my-pem-certificate.pem"

Note: and may be different in Linux environment

enter image description here

Once the above command is successfully executed, it will prompt for password of jks file (which is given while creating the jks file). Enter the password of the jks file.

After successful creation of pem file, success message is displayed as below:

Certificate stored in file <D:\keystore\my-pem-certificate.pem>

Note: The directory paths shown in screenshots are taken from windows environment. The path will be different for Linux environment.