From 6d7a2c0502ed0e85879a3273a63651f9bdd156ca Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Fri, 16 Jun 2023 17:56:11 +0800 Subject: [PATCH] update docs Signed-off-by: Annie_wang --- .../security/hapsigntool-guidelines.md | 14 +++++++++----- .../security/hapsigntool-overview.md | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/en/application-dev/security/hapsigntool-guidelines.md b/en/application-dev/security/hapsigntool-guidelines.md index 70b23208ca..e9176bde8d 100644 --- a/en/application-dev/security/hapsigntool-guidelines.md +++ b/en/application-dev/security/hapsigntool-guidelines.md @@ -246,8 +246,10 @@ The process of signing a HAP is as follows: ```shell java -jar hap-sign-tool.jar generate-keypair -keyAlias "oh-app1-key-v1" -keyAlg "ECC" -keySize "NIST-P-256" -keystoreFile "OpenHarmony.p12" -keyPwd "123456" -keystorePwd "123456" ``` - - > Note:
Record the values of **keyAlias**, **keyStorePwd**, and **keyPwd**. These values will be used when the application signing certificate is generated and the HAP is signed. + + > **NOTE** + > + > Record the values of **keyAlias**, **keyStorePwd**, and **keyPwd**. These values will be used when the application signing certificate is generated and the HAP is signed. The command parameters are described as follows: @@ -325,16 +327,18 @@ The process of signing a HAP is as follows: ```shell java -jar hap-sign-tool.jar sign-app -keyAlias "oh-app1-key-v1" -signAlg "SHA256withECDSA" -mode "localSign" -appCertFile "app1.pem" -profileFile "app1-profile.p7b" -inFile "app1-unsigned.zip" -keystoreFile "OpenHarmony.p12" -outFile "app1-signed.hap" -keyPwd "123456" -keystorePwd "123456" ``` - > Note:
The following parameters are used when there is no application signing certificate available. If the application signing certificate is available, the following parameters must be modified. + > **NOTE** + > + > The following parameters are used when there is no application signing certificate available. If the application signing certificate is available, the following parameters must be modified. > > - **keyAlias**: Enter the key alias of the application signing certificate. This parameter is mandatory. > - **appCertFile**: Enter the application signing certificate. This parameter is mandatory. > - **keystoreFile**: Enter the KS file of the application signing certificate. This parameter is mandatory. - > - **keyPwd**: Enter the key password in the KS file. +> - **keyPwd**: Enter the key password in the KS file. > - **keystorePwd**: Enter the KS password in the KS file. The command parameters are described as follows: - + ``` sign-app: Sign a HAP. ├──-keyAlias # Key alias, which must be the same as the alias of the key pair generated. This parameter is mandatory. diff --git a/en/application-dev/security/hapsigntool-overview.md b/en/application-dev/security/hapsigntool-overview.md index 24901bd3b2..531da18cdd 100644 --- a/en/application-dev/security/hapsigntool-overview.md +++ b/en/application-dev/security/hapsigntool-overview.md @@ -2,7 +2,9 @@ To ensure the integrity and secure source of OpenHarmony applications, the applications must be signed during the build process. Only signed applications can be installed, run, and debugged on real devices. [developtools_hapsigner](https://gitee.com/openharmony/developtools_hapsigner) provides the source code of the OpenHarmony Ability Package (HAP) signing tool - hapsigner. This tool can be used to generate key pairs, certificate signing requests (CSRs), certificates, profile signatures, and HAP signatures. -> **NOTE**
For applications that do not need to apply for permissions using the ACL, DevEco Studio provides an auto signing solution to implement one-click signing of applications or services. For details, see [Having Your App Automatically Signed](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-auto-configuring-signature-information-0000001271659465). +> **NOTE** +> +> For applications that do not need to apply for permissions using the ACL, DevEco Studio provides an auto signing solution to implement one-click signing of applications or services. For details, see [Having Your App Automatically Signed](https://developer.harmonyos.com/en/docs/documentation/doc-guides/ohos-auto-configuring-signature-information-0000001271659465). ## Basic Concepts -- GitLab