Customized application signature method and system, terminal and storage medium
By obtaining the application information and specifying the device ID of the user subscribed, using the signature tool to generate a key and authorization file, re-signing the application and verifying the device ID, the problem that application signatures cannot be installed on multiple devices in the prior art is solved, and the problem of application signatures cannot be installed on multiple devices is realized. Multi-device installation and security verification for customized applications.
Patent Information
- Application Number
- CN202410992283.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
AI Technical Summary
Existing application signature methods cannot quickly install customized applications on multiple devices specified, resulting in user-subscribed applications that can only be installed on a single device, and cannot achieve batch or multi-device installation.
By obtaining the application information and the specified device ID subscribed by the user, using the signature tool to generate a key and authorization file, resigning the application and verifying the device ID, ensuring that the application can only be installed on the specified device, realizing the multi-device installation of customized applications.
It realizes the rapid installation of user-subscribed applications on multiple designated devices, ensuring the security and uniqueness of applications, and avoiding the trouble of users remembering signature files.
Smart Images

Figure CN118944891A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of application signature, and in particular to a customized application signature method, system, terminal and storage medium. Background Art
[0002] An application signature is a signature for an application. It is the result of hashing the executable file or script data in the application and then encrypting it with RSA (asymmetric encryption algorithm). This process ensures that the software has not been modified or damaged after signing. There are two main functions of application signatures: one is to verify whether the installation package has been modified, and the other is to confirm the identity of the signer. A key file is required for signing. The signature identity information of the APK signed with the same key file is the same. Using different key files will naturally result in different signature identity information. Unless you can get the developer's key file, it is difficult to forge the original signature identity information on a modified APK file by relying only on the signature information file.
[0003] Application signatures are classified into: Symbian paid certificate signature, author signature using public free certificate, user signature (using development certificate), etc. The implementation of application signature is not only for security verification, but also involves application upgrades, modularization, data sharing, etc. Therefore, once the APK is signed and launched, the signature file and password alias must be remembered and not lost to avoid inconvenience or disastrous consequences for users.
[0004] However, if the user-subscribed application can only be installed on specified devices, a customized application signing method is required. Application signing methods such as Symbian paid certificate signing, author signing with a public free certificate, and user signing (using a development certificate) cannot quickly install customized applications on multiple specified devices. Summary of the invention
[0005] The main purpose of the present invention is to provide a customized application signing method, system, terminal and computer-readable storage medium, aiming to solve the problem that the existing application signing method cannot quickly install customized applications on multiple specified devices.
[0006] To achieve the above object, the present invention provides a customized application signing method, which comprises the following steps: Obtaining the application information subscribed by the user, the configured designated installation device ID and the corresponding application; wherein the application is an application signed by the application market; Generate the key corresponding to the application through the signing tool, and re-sign to obtain the authorization file and HAP file; Verifying the re-signature and device ID of the application according to the key, the authorization file and the HAP file; Install customized applications based on the verification results.
[0007] Optionally, obtaining the application information subscribed by the user, the configured designated installation device ID and the corresponding application specifically includes: Obtaining API information or SDK information provided by the application market, and querying the application information subscribed by the user and the device ID of the specified installation configured in the user subscription information according to the API information or the SDK information; Obtain from the application market a corresponding application signed by the application market.
[0008] Optionally, the step of generating a key corresponding to the application by using a signature tool and re-signing the authorization file and the HAP file specifically includes: Generate a key library and a key pair corresponding to the application based on the signature tool; The authorization file is generated based on the identifier, validity period, authorization type and designated device ID corresponding to the application, and the HAP file is generated based on the integration agreement between the application and the device provider.
[0009] Optionally, the verifying the re-signature and the device ID of the application according to the key, the authorization file, and the HAP file specifically includes: Verify the application market certificate in the HAP package according to the application market root CA certificate built into the specified device, and use the application market certificate to verify the signature information of the application market; Verify whether the device to be installed is the specified device according to the device ID configured in the authorization file; Verify whether the application market signing certificate is in the trusted application market list to ensure the trusted source of the application.
[0010] Optionally, verifying the application market certificate in the HAP package according to the application market root CA certificate built into the designated device, and using the application market certificate to verify the signature information of the application market, specifically includes: Obtaining a built-in trusted root CA certificate from the specified device; Performing certificate chain verification on the application market certificate in the HAP package according to the trusted root CA certificate; The application market certificate is used to verify the signature information of the application market.
[0011] Optionally, the step of verifying whether the application market signature certificate is in a trusted application market list to ensure a trusted source of the application specifically includes: Use the signature extraction tool to extract the application market signature certificate in the application package; Use the signature verification command to verify the validity of the application market signature certificate and compare it with a known trusted certificate authority; If the application market signing certificate matches the certificate in the trusted application market list, it is determined that the application is from a trusted source.
[0012] Optionally, installing a customized application according to the verification result specifically includes: comparing the signing certificate of the re-signed application with the signing certificate of the original application; If the signing certificates do not match, a customized app is installed and a report on the app's authenticity and integrity is displayed to the user.
[0013] In addition, to achieve the above-mentioned purpose, the present invention also provides a customized application signature system, wherein the customized application signature system includes: An information acquisition module, used to acquire the application information subscribed by the user, the configured designated installation device ID and the corresponding application; wherein the application is an application signed by the application market; A file issuing module, used to generate a key corresponding to the application through a signing tool, and re-sign to obtain an authorization file and a HAP file; A re-signature module, used to verify the re-signature and device ID of the application according to the key, the authorization file and the HAP file; The verification and installation module is used to install customized applications based on the verification results.
[0014] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a customized application signature program stored in the memory and executable on the processor, and when the customized application signature program is executed by the processor, the steps of the customized application signature method as described above are implemented.
[0015] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a customized application signature program, and when the customized application signature program is executed by a processor, the steps of the customized application signature method as described above are implemented.
[0016] In the present invention, the application information subscribed by the user, the configured designated installation device ID and the corresponding application are obtained; wherein the application is an application signed by the application market; the key corresponding to the application is generated by a signature tool, and the authorization file and HAP file are re-signed; the re-signature and device ID of the application are verified according to the key, the authorization file and the HAP file; and the customized application is installed according to the verification result. The present invention can quickly install customized applications on multiple designated devices, realizing the function that the application subscribed by the user can only be installed on the device specified by the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of a preferred embodiment of the customized application signature method of the present invention; Figure 2 It is a structural diagram of a preferred embodiment of the customized application signature system of the present invention; Figure 3 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0019] The existing categories of application signatures include: Symbian paid certificate signature, author signature using public free certificate, user signature (using development certificate), etc. The implementation of application signature is not only for security verification, but also involves application upgrades, modularization, and data sharing. Therefore, once the APK is signed and launched, the signature file and password alias must be remembered and not lost to avoid inconvenience or catastrophic consequences for users.
[0020] However, if the user-subscribed application can only be installed on specified devices, a customized application signing method is required. Application signing methods such as Symbian paid certificate signing, author signing with a public free certificate, and user signing (using a development certificate) cannot quickly install customized applications on multiple specified devices.
[0021] In order to solve the problem that the existing application signing method cannot quickly install customized applications on multiple specified devices, an embodiment of the present invention provides a customized application signing method, which obtains the application information subscribed by the user, the configured specified installation device ID and the corresponding application; wherein the application is an application signed by the application market; generates the key corresponding to the application through a signing tool, and re-signs to obtain an authorization file and a HAP file; verifies the re-signature and device ID of the application according to the key, the authorization file and the HAP file; and installs the customized application according to the verification result. The present invention can quickly install customized applications on multiple specified devices, realizing the function that the application subscribed by the user can only be installed on the device specified by the user.
[0022] The customized application signing method described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the customized application signing method includes the following steps: Step S10: obtaining the application information subscribed by the user, the configured designated installation device ID and the corresponding application; wherein the application is an application signed by the application market.
[0023] It should be noted that in this application, the customized application signing method described is mainly to re-sign the application subscribed by the user, thereby replacing the developer's signature, and restricting the application to be installed only on specified devices in the authorization file, thereby achieving the purpose of user-customized application installation and ensuring the security of application installation on specified devices.
[0024] Before re-signing the application subscribed by the user, it is necessary to obtain the application information subscribed by the user and the designated installation device ID configured by the user; in order to implement a batch customization solution, in this application, a variety of different designated installation device IDs can be configured (for example, 100 designated installation devices can be configured), thereby realizing the function of batch application re-signing and installation; when obtaining the application information subscribed by the user and the configured designated installation device ID and other information, it is also necessary to download the subscribed application from the corresponding application market in order to re-sign and install these subscribed applications.
[0025] Furthermore, the obtaining of the application information subscribed by the user, the configured designated installation device ID and the corresponding application specifically includes: Obtaining API information or SDK information provided by the application market, and querying the application information subscribed by the user and the device ID of the specified installation configured in the user subscription information according to the API information or the SDK information; Obtain from the application market a corresponding application signed by the application market.
[0026] Specifically, in the present application, in the process of obtaining the application information subscribed by the user, the application information of these subscribed applications can be obtained through the API information or SDK information provided by the application market; wherein, the API information or the SDK information is information provided by the developer center or developer documentation of the application market; according to the API information or the SDK information, the application information subscribed by the user can be queried, and then the device ID of the specified installation configured by the user in the corresponding configuration center can be obtained; thereafter, in order to realize the functions of re-signing and installing these subscribed applications, these subscribed applications need to be downloaded from the corresponding application market; wherein, these applications downloaded from the application market are signed applications provided by the application market; in the present application, these application market signatures need to be replaced with customized signatures to ensure that the subscribed applications can only be installed on the devices specified by the user.
[0027] Step S20: Generate a key corresponding to the application through a signing tool, and re-sign to obtain an authorization file and a HAP file.
[0028] Specifically, in the present application, for applications downloaded from the application market and signed by the application market, it is necessary to generate the key corresponding to the application through the signing tool, and obtain the authorization file and HAP file through the signing tool, so as to achieve the re-signing of the application signed by the application market; in the present application, the signing tool is mainly responsible for the generation and storage of keys, and the issuance of authorization files and HAP files; wherein the authorization file is a file generated based on the specified installed device ID; the HAP file is an application package (HAP package) downloaded or obtained from the application market, which contains the application certificate after issuance.
[0029] Further, the key corresponding to the application is generated by a signature tool, and the authorization file and the HAP file are obtained by re-signing, specifically including: Generate a key library and a key pair corresponding to the application based on the signature tool; The authorization file is generated based on the identifier, validity period, authorization type and designated device ID corresponding to the application, and the HAP file is generated based on the integration agreement between the application and the device provider.
[0030] Specifically, in this application, the local IDE integrated signature tool can be used as a key generation tool to generate the key library and key pair corresponding to the application; wherein the key pair includes a public key and a private key. The private key is used to sign the file, and the public key is used to verify the validity of the signature; when the key library and key pair corresponding to the application are generated by the local IDE integrated signature tool, the authorization file and HAP file can also be issued by the local IDE integrated signature tool, specifically: the local IDE integrated signature tool can generate the authorization file through the identifier, validity period, authorization type and specified device ID corresponding to the application, and generate the HAP file through the integration agreement between the application and the device supplier.
[0031] In this application, the file is signed by the local IDE integrated signing tool. The signing tool usually uses a private key to digitally sign the file, generates a signature file or adds digital signature metadata to the file itself. For the authorization file issued by the signing tool, the authorization file is a file used to specify user permissions. It can contain the license information of the application, the user's permission level or permission, and the corresponding authorization content (for example, the user specifies the device ID for installation). The process of generating an authorization file usually involves combining this information with encryption or signing to ensure that it is not tampered with and can only be parsed by the authorized party; for the HAP file issued by the signing tool, the HAP file contains device description information, service characteristics and other content, and its integrity and legitimacy need to be verified by a digital signature.
[0032] Step S30: verify the re-signature and device ID of the application according to the key, the authorization file and the HAP file.
[0033] Specifically, in the present invention, after the application is re-signed, the signature file can be verified through the signature verification module, and the corresponding installation permission can be granted through the permission management module; after the permission is granted, the application installation package can be security-verified through the security management module, and the application installation package can be verified and installed through the installation management module.
[0034] Further, the verifying the re-signature and device ID of the application according to the key, the authorization file and the HAP file specifically includes: Verify the application market certificate in the HAP package according to the application market root CA certificate built into the specified device, and use the application market certificate to verify the signature information of the application market; Verify whether the device to be installed is the specified device according to the device ID configured in the authorization file; Verify whether the application market signing certificate is in the trusted application market list to ensure the trusted source of the application.
[0035] Specifically, in this application, when verifying the re-signature and device ID of the application, it is necessary to first obtain the root CA certificate provided by the application market built into the specified device. Then, extract the application market certificate in the re-signed HAP package, use the root CA certificate built into the device to compare and verify the application market certificate in the HAP package to ensure the legitimacy of the application market certificate in the HAP package, and use the application market certificate to verify the signature information of the application market to ensure the legitimacy of the signature of the application market.
[0036] After verifying the signature information of the application market, verify whether the current device to be installed is the specified device based on the device ID configured in the authorization file. This process mainly matches the ID of the current device to be installed with the device ID configured in the authorization file. If they match, continue to verify whether the application market signature certificate is in the trusted application market list to ensure the trusted source of the application, thereby completing the device verification process.
[0037] Further, the verifying the application market certificate in the HAP package according to the application market root CA certificate built into the designated device, and using the application market certificate to verify the signature information of the application market, specifically includes: Obtaining a built-in trusted root CA certificate from the specified device; Performing certificate chain verification on the application market certificate in the HAP package according to the trusted root CA certificate; The application market certificate is used to verify the signature information of the application market.
[0038] Specifically, in the present application, in the process of using the device's built-in root CA certificate to verify the application market certificate in the HAP package, first, the application market certificate in the HAP package is compared with the device's built-in root CA certificate to ensure the legitimacy and validity of the certificate; then, a suitable encryption and verification algorithm, such as RSA, ECDSA, etc., is used to verify the validity of the signature of the certificate; finally, it is confirmed that the information in the certificate, such as the issuer of the application, the signing time, etc., is consistent with expectations.
[0039] In the process of using the application market certificate to verify the signature information of the application market, first, the digital signature information of the application can be extracted from the application downloaded from the application market. This information usually includes the signature algorithm, the hash value or summary of the signature, the certificate chain of the signer, etc. Then, the obtained application market certificate or public key is used to verify the signature information extracted from the application market, mainly including: 1) Use the public key of the certificate to decrypt or verify the signature information; 2) Verify the integrity and validity of the signature to ensure that the signature has not been tampered with or forged; 3) Confirm the signature’s timestamp, signer, algorithm and other information to ensure that the signature is generated by a legitimate app market or developer.
[0040] Furthermore, the verification of whether the application market signature certificate is in the trusted application market list to ensure the trusted source of the application specifically includes: Use the signature extraction tool to extract the application market signature certificate in the application package; Use the signature verification command to verify the validity of the application market signature certificate and compare it with a known trusted certificate authority; If the application market signing certificate matches the certificate in the trusted application market list, it is determined that the application is from a trusted source.
[0041] Specifically, in the present application, when verifying whether the application market signing certificate is in the trusted application market list, the application market signing certificate in the application package can be extracted through a signature extraction tool (for example, the apksigner tool); then, the trusted application market list is obtained from the operating system provider; finally, the root certificate pre-installed in the device or the trust storage in the operating system is used to verify whether the signing certificate extracted from the application package is issued by any trusted application market, for example, the apksigner verify command is used to verify the validity of the signing certificate and compare it with a known trusted certificate authority; if the signing certificate can be found in any trusted application market list, it can be determined that the application comes from a trusted source, and if the signing certificate cannot be matched to any known trusted certificate authority or application market list, the re-signed application cannot be installed in the specified device.
[0042] Step S40: Install the customized application according to the verification result.
[0043] It should be noted that in this application, the applications subscribed by the customer can only be installed on the device specified by the customer. After the re-signed application is distributed to the customer, the platform information is retained and the customer information is added (that is, the specified device ID information is added). After the application is re-signed and the device ID is verified successfully, the re-signed application can be installed, thereby realizing the installation of customized applications.
[0044] Furthermore, installing the customized application according to the verification result specifically includes: comparing the signing certificate of the re-signed application with the signing certificate of the original application; If the signing certificates do not match, a customized app is installed and a report on the app's authenticity and integrity is displayed to the user.
[0045] Specifically, in this application, in order to further verify whether the re-signed application meets the requirements, it is also necessary to compare the signing certificate of the re-signed application with the signing certificate of the original application to determine whether the signing has been successful. If the signing certificates do not match, the customized application is installed and the authenticity and integrity report of the application is displayed to the user; if the signing certificates match, it is prompted that the subscribed application cannot be installed in the specified device, and the subscribed application needs to be re-signed before it can be installed in the specified device.
[0046] In the present invention, the application information subscribed by the user, the configured designated installation device ID and the corresponding application are obtained; wherein the application is an application signed by the application market; the key corresponding to the application is generated by a signature tool, and the authorization file and HAP file are re-signed; the re-signature and device ID of the application are verified according to the key, the authorization file and the HAP file; and the customized application is installed according to the verification result. The present invention can quickly install customized applications on multiple designated devices, realizing the function that the application subscribed by the user can only be installed on the device specified by the user.
[0047] Furthermore, if Figure 2 As shown, based on the above customized application signing method, the present invention also provides a customized application signing system accordingly, wherein the customized application signing system includes: The information acquisition module 21 is used to obtain the application information subscribed by the user, the configured designated installation device ID and the corresponding application; wherein the application is an application signed by the application market; The file issuing module 22 is used to generate a key corresponding to the application through a signing tool, and re-sign to obtain an authorization file and a HAP file; A re-signature module 23, configured to verify the re-signature and device ID of the application according to the key, the authorization file and the HAP file; The verification and installation module 24 is used to install the customized application according to the verification result.
[0048] Furthermore, if Figure 3 As shown, based on the above-mentioned customized application signing method and system, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0049] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 can also be used to temporarily store data that has been output or is to be output. In one embodiment, a customized application signature program 40 is stored on the memory 20, and the customized application signature program 40 can be executed by the processor 10, thereby realizing the customized application signature method in the present application.
[0050] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the customized application signing method.
[0051] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0052] In one embodiment, when the processor 10 executes the customized application signature program 40 in the memory 20, the following steps are implemented: Obtaining the application information subscribed by the user, the configured designated installation device ID and the corresponding application; wherein the application is an application signed by the application market; Generate the key corresponding to the application through the signing tool, and re-sign to obtain the authorization file and HAP file; Verifying the re-signature and device ID of the application according to the key, the authorization file and the HAP file; Install customized applications based on the verification results.
[0053] Optionally, obtaining the application information subscribed by the user, the configured designated installation device ID and the corresponding application specifically includes: Obtaining API information or SDK information provided by the application market, and querying the application information subscribed by the user and the device ID of the specified installation configured in the user subscription information according to the API information or the SDK information; Obtain from the application market a corresponding application signed by the application market.
[0054] Optionally, the step of generating a key corresponding to the application by using a signature tool and re-signing the authorization file and the HAP file specifically includes: Generate a key library and a key pair corresponding to the application based on the signature tool; The authorization file is generated based on the identifier, validity period, authorization type and designated device ID corresponding to the application, and the HAP file is generated based on the integration agreement between the application and the device provider.
[0055] Optionally, the verifying the re-signature and the device ID of the application according to the key, the authorization file, and the HAP file specifically includes: Verify the application market certificate in the HAP package according to the application market root CA certificate built into the specified device, and use the application market certificate to verify the signature information of the application market; Verify whether the device to be installed is the specified device according to the device ID configured in the authorization file; Verify whether the application market signing certificate is in the trusted application market list to ensure the trusted source of the application.
[0056] Optionally, verifying the application market certificate in the HAP package according to the application market root CA certificate built into the designated device, and using the application market certificate to verify the signature information of the application market, specifically includes: Obtaining a built-in trusted root CA certificate from the specified device; Performing certificate chain verification on the application market certificate in the HAP package according to the trusted root CA certificate; The application market certificate is used to verify the signature information of the application market.
[0057] Optionally, the step of verifying whether the application market signature certificate is in a trusted application market list to ensure a trusted source of the application specifically includes: Use the signature extraction tool to extract the application market signature certificate in the application package; Use the signature verification command to verify the validity of the application market signature certificate and compare it with a known trusted certificate authority; If the application market signing certificate matches the certificate in the trusted application market list, it is determined that the application is from a trusted source.
[0058] Optionally, installing a customized application according to the verification result specifically includes: comparing the signing certificate of the re-signed application with the signing certificate of the original application; If the signing certificates do not match, a customized app is installed and a report on the app's authenticity and integrity is displayed to the user.
[0059] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a customized application signature program, and when the customized application signature program is executed by a processor, the steps of the customized application signature method as described above are implemented.
[0060] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or terminal including the element.
[0061] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0062] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A customized application signing method, characterized in that: The customized application signing method includes: Obtaining the application information subscribed by the user, the configured designated installation device ID and the corresponding application; wherein the application is an application signed by the application market; Generate the key corresponding to the application through the signing tool, and re-sign to obtain the authorization file and HAP file; Verifying the re-signature and device ID of the application according to the key, the authorization file and the HAP file; Install customized applications based on the verification results.
2. The customized application signing method according to claim 1, characterized in that: The obtaining of the application information subscribed by the user, the configured designated installation device ID and the corresponding application specifically includes: Obtaining API information or SDK information provided by the application market, and querying the application information subscribed by the user and the device ID of the specified installation configured in the user subscription information according to the API information or the SDK information; Obtain from the application market a corresponding application signed by the application market.
3. The customized application signing method according to claim 1, characterized in that: The step of generating a key corresponding to the application by using a signature tool and re-signing the authorization file and the HAP file specifically includes: Generate a key library and a key pair corresponding to the application based on the signature tool; The authorization file is generated based on the identifier, validity period, authorization type and designated device ID corresponding to the application, and the HAP file is generated based on the integration agreement between the application and the device provider.
4. The customized application signing method according to claim 1, characterized in that: The verifying the re-signature and the device ID of the application according to the key, the authorization file and the HAP file specifically includes: Verify the application market certificate in the HAP package according to the application market root CA certificate built into the specified device, and use the application market certificate to verify the signature information of the application market; Verify whether the device to be installed is the specified device according to the device ID configured in the authorization file; Verify whether the application market signing certificate is in the trusted application market list to ensure the trusted source of the application.
5. The customized application signing method according to claim 4, characterized in that: The verifying the application market certificate in the HAP package according to the application market root CA certificate built into the designated device, and verifying the signature information of the application market using the application market certificate specifically includes: Obtaining a built-in trusted root CA certificate from the specified device; Performing certificate chain verification on the application market certificate in the HAP package according to the trusted root CA certificate; The application market certificate is used to verify the signature information of the application market.
6. The customized application signing method according to claim 4, characterized in that: The step of verifying whether the application market signature certificate is in the trusted application market list to ensure the trusted source of the application specifically includes: Use the signature extraction tool to extract the application market signature certificate in the application package; Use the signature verification command to verify the validity of the application market signature certificate and compare it with a known trusted certificate authority; If the application market signing certificate matches the certificate in the trusted application market list, it is determined that the application is from a trusted source.
7. The customized application signing method according to claim 1, characterized in that: The installing of the customized application according to the verification result specifically includes: comparing the signing certificate of the re-signed application with the signing certificate of the original application; If the signing certificates do not match, a customized app is installed and a report on the app's authenticity and integrity is displayed to the user.
8. A customized application signature system, characterized in that: The customized application signature system includes: An information acquisition module, used to acquire the application information subscribed by the user, the configured designated installation device ID and the corresponding application; wherein the application is an application signed by the application market; A file issuing module, used to generate a key corresponding to the application through a signing tool, and re-sign to obtain an authorization file and a HAP file; A re-signature module, used to verify the re-signature and device ID of the application according to the key, the authorization file and the HAP file; The verification and installation module is used to install customized applications based on the verification results.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a customized application signature program stored in the memory and executable on the processor. When the customized application signature program is executed by the processor, the steps of the customized application signature method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a customized application signature program, and when the customized application signature program is executed by a processor, the steps of the customized application signature method according to any one of claims 1 to 7 are implemented.
