CN110321669A - Method, apparatus, equipment and the storage medium that application program is signed again - Google Patents
Method, apparatus, equipment and the storage medium that application program is signed again Download PDFInfo
- Publication number
- CN110321669A CN110321669A CN201910482641.8A CN201910482641A CN110321669A CN 110321669 A CN110321669 A CN 110321669A CN 201910482641 A CN201910482641 A CN 201910482641A CN 110321669 A CN110321669 A CN 110321669A
- Authority
- CN
- China
- Prior art keywords
- bundle
- authority
- certificate
- value
- application program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 238000012986 modification Methods 0.000 claims description 20
- 230000004048 modification Effects 0.000 claims description 20
- 230000006837 decompression Effects 0.000 claims description 18
- 238000009434 installation Methods 0.000 claims description 11
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 238000013475 authorization Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000010408 sweeping Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/105—Arrangements for software license management or administration, e.g. for managing licenses at corporate level
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/121—Restricting unauthorised execution of programs
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
The present invention relates to big data technical fields, disclose a kind of method that application program is signed again, and the method that the application program is signed again includes: to obtain the decompressing files of application program installation kit when receiving directive script;According to the decompressing files got, the bundle id value and description file in the preset certificate of authority are read;When modifying the description file, the authority of the decompressing files is generated;According to the bundle id value in the authority of generation and the preset certificate of authority, is signed again to the decompressing files and generate new signing messages.The invention also discloses a kind of device that application program is signed again, computer equipment and computer readable storage mediums.The present invention, which is realized, is encapsulated as script file for the complicated instruction of label again to be signed to application program again, and is signed again without using label tool again, and the condition depended that application program is signed again is reduced.
Description
Technical field
The present invention relates to the batch updating technical field of data processing more particularly to a kind of sides that application program is signed again
Method, device, computer equipment and computer readable storage medium.
Background technique
With going from strength to strength for company size, application program (application, APP) business demand is increasing,
If APP packet will operate in above mobile phone, there are following three kinds of methods: 1, being downloaded by App Store;2, enterprise's certificate, which is packaged, divides
Hair;3, developer's certificate first injects UDID (UniqueDevice Identifier, the Unique Device knowledge of equipment of operation mobile phone
Not Fu), then be packaged by the certificate.If arbitrary APP packet is installed on any mobile phone, it is necessary to which consideration is demonstrate,proved with enterprise
Book signs again to APP packet, and for enterprise's certificate, the equipment of the corresponding installation kit of a certificate can be installed
Number is conditional, 100 equipment of usual limitation.And for big companies are compared with Large Groups, the equipment to be added is more,
It is easy for reaching the upper limit of limitation quantity, therefore, centainly having a collection of equipment can not be added in certificate.
In order to solve this problem, the mode signed again usually using enterprise's certificate to existing installation kit is by installation kit
It generates Inhouse packet externally to provide, the equipment that certificate is added can not be limited by installation number.But it is existing to using journey
There are mainly two types of for the method that sequence is signed again: one, being signed again manually using order line;According to signing again
Required step manually inputs order line on the computer of particular system, is signed again to application program.Two, make
It is signed again with label tool again;Tool is signed again by installing in the computer of particular system, and utilizes the heavy label tool
Again it is signed.
Summary of the invention
The main purpose of the present invention is to provide a kind of methods that application program is signed again, it is intended to which solution is answered in the prior art
It is signed and is signed again manually using order line or using the technical issues of label tool is signed again again again with program.
To achieve the above object, the present invention provides a kind of method that application program is signed again, and the application program is signed again
Method include:
When receiving directive script, the decompressing files of application program installation kit is obtained;
According to the decompressing files got, the bundle id value and description file in the preset certificate of authority are read;
When modifying the description file, the authority of the decompressing files is generated;
According to the bundle id value in the authority of generation and the preset certificate of authority, to the decompression text
Part is signed again generates new signing messages.
Optionally, described when receiving directive script, the decompressing files for obtaining application program installation kit includes:
Receive user script command line send when executing instruction, search for application installation kit is simultaneously solved
Pressure;
When application program installation kit decompression, the Payload file of the application program installation kit decompression is obtained;
When the Payload file that scanning is got, component Name to be signed in the Payload file is got
With former certificate bundle information.
Optionally, it is described when scanning get the Payload file when, get in the Payload file to
After signature component title and former certificate bundle information, further includes:
When getting the component Name to be signed is plugin name or wrist-watch title, the plugin name or hand are deleted
The respective file of table name.
Optionally, when getting the decompressing files, the bundle id value and description text in the preset certificate of authority are read
Part, comprising:
When getting Payload file Central Plains certificate bundle information, the former certificate bundle information is detected;
When detecting the bundle id value of the former certificate bundle information, read in the preset certificate of authority
Bundle id value and description file.
Optionally, described when modifying the description file, generate the authority of the decompressing files, comprising:
When reading the description file, preset certificate of authority bundleid value described in the description file is obtained
Format;
According to the bundle id value of preset modification format and the former certificate bundle information, the description file is modified
Described in preset certificate of authority bundle id value format, generate the authority of the Payload file.
Optionally, the bundle id value in the authority and the preset certificate of authority according to generation is right
The decompressing files is signed again generates new signing messages, comprising:
When reading the bundle id value in the preset certificate of authority, the former certificate bundle information is modified
Bundle id value;
When the authority for the Payload file for getting generation, in the modified Payload file to
The corresponding file of signature component title is signed again, generates new signing messages.
Optionally, described when reading the bundle id value in the preset certificate of authority, modify the former certificate
The bundle id value of bundle information, comprising:
Bundle in the bundle id value and the former certificate bundle information for getting the preset certificate of authority
When id value, the bundle id value in the bundle id value and the former certificate bundle information of the preset certificate of authority is judged
It is whether identical;
Determining the bundleid value of bundle id value and the certificate of authority in the former certificate bundle information not
When identical, the bundle id value in the former certificate bundle information is modified.
In addition, to achieve the above object, the present invention also provides a kind of device, described device includes:
Acquiring unit, for when receiving directive script, obtaining the decompressing files of application program;
Reading unit, for reading in the preset certificate of authority according to the decompressing files got
Bundle id value and description file;
Generation unit is modified, for generating the authority of decompressing files when modifying the description file;
Weight signature unit, for the bundle id in the authority and the preset certificate of authority according to generation
Value, signs again to the decompressing files and generates new signing messages.
Optionally, the acquiring unit is specifically used for:
Receive user script command line send when executing instruction, search for application installation kit is simultaneously solved
Pressure;
When application program installation kit decompression, the Payload file of the application program installation kit decompression is obtained;
When the Payload file that scanning is got, component Name to be signed in the Payload file is got
With former certificate bundle information.
Optionally, the device that the application program is signed again, further includes:
Unit is deleted, for deleting institute when getting the component Name to be signed is plugin name or wrist-watch title
State the respective file of plugin name or wrist-watch title.
Optionally, the reading unit is specifically used for:
When getting Payload file Central Plains certificate bundle information, the former certificate bundle information is detected;
When detecting the bundle id value of the former certificate bundle information, read in the preset certificate of authority
Bundle id value and description file.
Optionally, the modification generation unit is specifically used for:
When reading the description file, preset certificate of authority bundleid value described in the description file is obtained
Format;
According to the bundle id value of preset modification format and the former certificate bundle information, the description file is modified
Described in preset certificate of authority bundle id value format, generate the authority of the Payload file.
Optionally, the heavy signature unit is specifically used for:
When reading the bundle id value in the preset certificate of authority, the former certificate bundle information is modified
Bundle id value;
When the authority for the Payload file for getting generation, in the modified Payload file to
The corresponding file of signature component title is signed again, generates new signing messages.
Optionally, the heavy signature unit is specifically also used to:
Bundle in the bundle id value and the former certificate bundle information for getting the preset certificate of authority
When id value, the bundle id value in the bundle id value and the former certificate bundle information of the preset certificate of authority is judged
It is whether identical;
Determining the bundleid value of bundle id value and the certificate of authority in the former certificate bundle information not
When identical, the bundle id value in the former certificate bundle information is modified.
In addition, to achieve the above object, the present invention also provides a kind of computer equipment, the computer equipment includes: to deposit
The application program weight signature procedure that reservoir, processor and being stored in can be run on the memory and on the processor, institute
State the method for realizing that the application program that as above invention is described is signed again when application program weight signature procedure is executed by the processor
The step of.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium
Application program weight signature procedure is stored on storage medium, the application program weight signature procedure is realized such as when being executed by processor
As above described in invention the step of application program weight endorsement method.
Method, apparatus, computer equipment and the computer that a kind of application program that the embodiment of the present invention proposes is signed again can
Storage medium is read, by obtaining the decompressing files of application program installation kit when receiving directive script;According to the institute got
Decompressing files is stated, bundle id value and description file in the preset certificate of authority are read;It is raw when modifying the description file
At the authority of the decompressing files;According to the bundle in the authority of generation and the preset certificate of authority
Id value signs again to the decompressing files and generates new signing messages, realizes the complicated order of label again being encapsulated as foot
The complicated instruction of label again is encapsulated as script file to be signed to application program again, and signs tool again not using by this document
Again it is signed, reduces the condition depended that application program is signed again.
Detailed description of the invention
Fig. 1 is the computer equipment structural schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of the first embodiment for the method that application program of the present invention is signed again;
Fig. 3 is the flow diagram of the second embodiment for the method that application program of the present invention is signed again;
Fig. 4 is the flow diagram of the 3rd embodiment for the method that application program of the present invention is signed again;
Fig. 5 is the flow diagram of the fourth embodiment for the method that application program of the present invention is signed again;
Fig. 6 is the flow diagram of the 5th embodiment of the method that application program of the present invention is signed again;
Fig. 7 is the flow diagram of the sixth embodiment for the method that application program of the present invention is signed again;
Fig. 8 is the flow diagram of the 7th embodiment of the method that application program of the present invention is signed again.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are: when receiving directive script, obtaining application program installation kit
Decompressing files;According to the decompressing files got, the bundle id value and description file in the preset certificate of authority are read;
When modifying the description file, the authority of the decompressing files is generated;According to the authority of generation and described
Bundle id value in the preset certificate of authority, signs again to the decompressing files and generates new signing messages.
It is signed and is signed again manually using order line or using signing tool again again due to application program in the prior art
Again it is signed.
The present invention provides a solution, and the complicated order of label again is encapsulated as script file, is corresponded to according to script
It is signed with program, and is signed again without using label tool again again, reduce the condition depended that application program is signed again
Degree.
As shown in FIG. 1, FIG. 1 is the terminal structure schematic diagrames for the hardware running environment that the embodiment of the present invention is related to.
The terminal of that embodiment of the invention can be the terminal devices such as tablet computer, portable computer.
As shown in Figure 1, the terminal may include: processor 1001, such as CPU, network interface 1004, user interface
1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components.
User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface
1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include that the wired of standard connects
Mouth, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory
(non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor
1001 storage device.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap
It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium
Believe module, Subscriber Interface Module SIM and application program weight signature procedure.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, carries out with background server
Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor
1001 can be used for calling the application program stored in memory 1005 weight signature procedure, and execute following operation:
When receiving directive script, the decompressing files of application program installation kit is obtained;
According to the decompressing files got, the bundle id value and description file in the preset certificate of authority are read;
When modification describes file, the authority of decompressing files is generated;
According to the bundle id value in the authority of generation and the preset certificate of authority, signed again to decompressing files
Generate new signing messages.
Further, processor 1001 can call the application program stored in memory 1005 weight signature procedure, also hold
The following operation of row:
Receive user script command line send when executing instruction, search for application installation kit is simultaneously solved
Pressure;
When application program installation kit decompression, the Payload file of application program installation kit decompression is obtained;
When the Payload file that scanning is got, component Name to be signed and former certificate in Payload file are obtained
Bundle information.
Further, processor 1001 can call the application program stored in memory 1005 weight signature procedure, also hold
The following operation of row:
When getting component Name to be signed is plugin name or wrist-watch title, plugin name or wrist-watch title are deleted
Respective file.
Further, processor 1001 can call the application program stored in memory 1005 weight signature procedure, also hold
The following operation of row:
When getting Payload file Central Plains certificate bundle information, former certificate bundle information is detected;
In the bundle id value for detecting former certificate bundle information, the bundle id in the preset certificate of authority is read
Value and description file.
Further, processor 1001 can call the application program stored in memory 1005 weight signature procedure, also hold
The following operation of row:
When reading description file, the format of preset certificate of authority bundle id value in description file is obtained;
It is preset in modification description file to award according to the bundle id value of preset modification format and former certificate bundle information
The format of warrant book bundle id value generates the authority of Payload file.
Further, processor 1001 can call the application program stored in memory 1005 weight signature procedure, also hold
The following operation of row:
When reading the bundle id value in the preset certificate of authority, the bundle id of former certificate bundle information is modified
Value;
When the authority for the Payload file for getting generation, to component to be signed in modified Payload file
The corresponding file of title is signed again, generates new signing messages.
Further, processor 1001 can call the application program stored in memory 1005 weight signature procedure, also hold
The following operation of row:
When the bundle id value in the bundle id value for getting the preset certificate of authority and former certificate bundle information,
Judge whether bundle id value and the bundleid value in the former certificate bundle information of the preset certificate of authority are identical;
When the bundle id value for determining bundle id value and the certificate of authority in former certificate bundle information is not identical,
Modify the bundle id value in former certificate bundle information.
Referring to Fig. 2, the present invention is the first embodiment for the method that application program is signed again, what the application program was signed again
Method includes:
Step S10 obtains the decompressing files of application program installation kit when receiving directive script;
When executing instruction of user's input is received in the script command line of terminal, is executed instruction including search instruction, solution
Pressure instruction and modification format order.Script is according to the title of search for application, and search for application is pacified in store path
Dress packet.When searching application program installation kit according to modification format order, terminal is by the IPA (apple of application program installation kit
Application format) form modifying is ZIP format, and calls preset UNZIP tool to pacify application program according to decompression instruction
Dress packet is decompressed, and terminal generates one with using journey in decompression procedure, in application program installation kit at store path
The file of sequence mark title.Terminal obtains application program installation when generating the file for having application program identification title
The decompressing files of packet, decompressing files are Payload file.When terminal gets Payload file, Payload file is scanned,
When scanning is to component Name to be signed in Payload file, script file generates a TXT file, and will scan
Signature component title copies in the TXT file.When the application attribute list of Payload file is arrived in scanning, obtains application and belong to
The bundle information of property list.
Step S20 reads the bundle id value and description text in the preset certificate of authority according to the decompressing files got
Part;
When terminal gets the decompressing files of application program installation kit, the preset certificate of authority is read.The mode packet of reading
It includes, script file is sent to terminal reads instruction, and terminal gets the certificate of authority title for reading and carrying in instruction and scans for.
When searching the corresponding certificate of authority file of certificate of authority name information, read description file in certificate of authority file and
The bundle id value of the certificate of authority.When the suffix name that the certificate name breath prestored in script file is certificate of authority title
When mobileprovision, certificate of authority file of the terminal searching to the entitled mobileprovision of suffix.Alternatively, working as script
When prestoring that be certificate of authority name information be full name, the identical authorization of the certificate of authority title prestored in terminal searching and script
Certificate file.
Step S30 generates the authority of decompressing files when modification describes file;
When terminal reads the description file in preset certificate of authority file, the certificate of authority in description file is obtained
The format of bundle id value, the bundle id value of former certificate bundle information that terminal detection is got, when detecting former card
When the bundle id value of book bundle information is with the certificate of authority bundleid value difference in file is described, modification description file
In certificate of authority bundle id value format generate Payload file authority.
Step S40 carries out weight to decompressing files according to the bundle id value in the authority and the certificate of authority of generation
Signature generates new signing messages.
Terminal judges of original certificate Payload in Payload file when getting the preset instruction of label again in script
Whether file identical as the bundle information in the preset certificate of authority, when Payload file of original certificate in Payload file with
When bundle information in the preset certificate of authority is identical, determine that Payload file meets the attribute of the preset certificate of authority.When
When bundle information in Payload file in of original certificate Payload file and the preset certificate of authority is not identical, determine
Payload file is unsatisfactory for the attribute of the preset certificate of authority.When Payload file is unsatisfactory for the attribute of the preset certificate of authority,
Script file sends modification instruction, modifies the bundle information in Payload file.In the TXT file for obtaining Payload file
In component Name to be signed when, the corresponding file of signature component title is treated according to authority and is signed again.Terminal is obtaining
When getting the instruction of label again prestored in script, label instruction reads txt text text with/usr/bin/codesign command format again
The title of component to be signed in part.Component Name to be signed includes dynamic library name, static library name etc..It is to be signed reading
When component Name, obtain component to be signed according to component Name to be signed, terminal according to authority treat signature component into
Row is signed again, and new signing messages is generated in component to be signed.
In the present embodiment, terminal is executed instruction what script command line inputted receiving user, obtains application program
The decompressing files of installation kit modifies the bundle information in decompressing files and generates and generate decompression according to the preset certificate of authority
The certificate of authority of file signs again to decompressing files and generates new signing messages when generating authority.It does not need to make
With tool is signed again, do not need under description file replacement current directory corresponding in certificate yet
Embedded.mobileprovision file regenerates new signing messages, reduces the environment that application program is signed again
It relies on.
Referring to Fig. 3, Fig. 3 is the second embodiment that the method that application program of the present invention is signed again provides, and is based on above-mentioned Fig. 2 institute
The embodiment shown, step S10 include:
Step S11, receive user script command line send when executing instruction, search for application installation kit is simultaneously
It is decompressed;
Step S12 obtains the Payload text of application program installation kit decompression when application program installation kit decompression
Part;
Step S13, when the Payload file that scanning is got, obtain in Payload file component Name to be signed and
Former certificate bundle information.
When executing instruction of user's input is received in the script command line of terminal, is executed instruction including search instruction, solution
Pressure instruction and modification format order.Script is according to the title of search for application, and search for application is pacified in store path
Dress packet.When searching application program installation kit according to modification format order, terminal is by the IPA (apple of application program installation kit
Application format) form modifying is ZIP format, and calls preset UNZIP tool to pacify application program according to decompression instruction
Dress packet is decompressed, and terminal generates one with using journey in decompression procedure, in application program installation kit at store path
The file of sequence mark title.Terminal is after decompressing application program installation kit, in the file for having application program identification title
In get Payload file, the master file of installation kit is all stored under Payload/APP_NAME.app/ catalogue, wherein
The component Name signed again in APP_NAME for needs.APP_NAME includes dynamic library name, static library name, interim
Plugin name and wrist-watch title etc..Terminal receives the scan instruction of script file, scans Payload file, obtains
The title of component to be signed in APP_NAME.The entitled dynamic library name of component to be signed, static library name, plugin name with
And wrist-watch title etc..When the application symbolic animal of the birth year list of Payload file is arrived in scanning, obtains and believe using the bundle of symbolic animal of the birth year list
Breath.Bundle information includes bundle id, version number, Icon file, display Name, support instruction set etc..
In the present embodiment, terminal is executed instruction what script command line inputted receiving user, obtains application program
Installation kit simultaneously decompresses application program installation kit, in the decompression Payload file for getting application program installation kit.It is sweeping
When retouching Payload file, the component Name to be signed in Payload file and former certificate bundle information are got.It will be complicated
The order of label again be encapsulated as script file, do not need artificial to send the complicated instruction of label again one by one.
Referring to Fig. 4, Fig. 4 is the 3rd embodiment that the method that application program of the present invention is signed again provides, and is based on above-mentioned Fig. 3 institute
The embodiment shown, after step S13, comprising:
Step S40 deletes plugin name or hand when getting component Name to be signed is plugin name or wrist-watch title
The respective file of table name.
When terminal gets component Name to be signed, preset plugin name or wrist-watch title are obtained.Judgement is got
Component Name to be signed whether be preset plugin name or wrist-watch title, when the component Name to be signed got is plug-in unit
When title, receive the preset delete command of script file transmission.Alternatively, when the component Name to be signed got is wrist-watch title
When, receive the preset delete command of script file transmission.Delete command is rm-rf order, and rm-rf order is a kind of Force Deletion
Order deletes root partition for recurrence, exactly deletes corresponding file, corresponding file also includes system itself.Terminal passes through foot
Unwanted wrist-watch title or the corresponding file of plugin name and catalogue are deleted in rm-rf order in this document.Rm-rf order
Function be the one or more files and catalogue deleted in a catalogue, can also by wrist-watch title or plugin name catalogue and
All Files and subdirectory under it are deleted.For threaded file, it is only disconnected link, source file remains unchanged.
In embodiment, when the component Name to be signed that terminal is got is wrist-watch title or plugin name, according to pre-
The delete command set, by wrist-watch title or the respective file and catalogue of plugin name wrist-watch title or plugin name delete
It removes, wrist-watch file and add-on file do not influence the function of application program, and deleting wrist-watch file and add-on file, not only simplification is signed again
Name operation, and can save the time signed again.
Referring to Fig. 5, Fig. 5 is the fourth embodiment that the method that application program of the present invention is signed again provides, and is based on above-mentioned Fig. 2 institute
The embodiment shown, step S20 include:
Step S21 detects the former certificate when getting the former certificate bundle information in the Payload file
Bundle information;
Step S22 reads the preset authorization when detecting the bundle id value of the former certificate bundle information
Bundle id value and description file in certificate.
When terminal gets the former certificate bundle information in application program installation kit Payload file, former card is obtained
Bundle id value in book bundle information.According to the bundle id value obtained in former certificate bundle information, read preset
The certificate of authority.The mode of reading includes, script file is sent to terminal reads instruction, and terminal gets to read and carry in instruction
Certificate of authority title scans for.When searching the corresponding certificate of authority file of certificate of authority name information, warrant is read
The bundle id value of description file and the certificate of authority in written matter.When the certificate name breath prestored in script file is
When the suffix name mobileprovision of certificate of authority title, authorization of the terminal searching to the entitled mobileprovision of suffix
Certificate file.
In the present embodiment, when former certificate bundle information of the terminal in getting decompressing files in Payload file,
Detect the bundle id value in former certificate bundle information, terminal is according to detecting in former certificate bundle information
Bundle id value reads bundle id value and description file in the preset certificate of authority, asks A Jin by script, do not using
Under the operation of manual command, the bundle id value and description file in the preset certificate of authority are quickly obtained.
Referring to Fig. 6, Fig. 6 is the 5th embodiment that the method that application program of the present invention is signed again provides, and is based on above-mentioned Fig. 2 institute
The embodiment shown, step S30 include:
Step S31 obtains the preset certificate of authority described in the description file when reading the description file
The format of bundle id value;
Step S32, according to the bundle id value of preset modification format and the former certificate bundle information, described in modification
The format for describing preset certificate of authority bundle id value described in file, generates the authority of the Payload file.
When terminal gets of original certificate bundle id value in the bundle information of Payload file, script is received
Generation instruction in file.Terminal is instructed according to the generation received, obtains the description file in the preset certificate of authority, terminal exists
When getting the description file in the preset certificate of authority, will describe the bundle id value form modifying in file is " pairs of initial value
Answer the format of bundle id ".Wherein, initial value is of original certificate bundle id value in bundle information, and bundle id is preset
Bundle id value in the certificate of authority.Specially terminal extracts description when getting the description file in the preset certificate of authority
Corresponding piece of Entitlements in file, by com.apple.developer.team- in Entitlements
The value of identifier is set as the form of " former certificate bundle id. corresponds to preset certificate of authority bundle id ", generates card
The authority of written matter.
In the present embodiment, terminal of original certificate bundle id in the bundle information for getting Payload file
When value, the generation instruction in script file is received.Terminal is instructed according to the generation received, is obtained in the preset certificate of authority
File is described, terminal is when getting the description file in the preset certificate of authority, the lattice of bundle id value in modification description file
Formula generates the authority of Payload file.By generating authority, without deleting to be signed group in Payload file
Part avoids application program operation from going wrong.
Referring to Fig. 7, Fig. 7 is the sixth embodiment that the method that application program of the present invention is signed again provides, and is based on above-mentioned Fig. 2 institute
The embodiment shown, step S40 include:
Step S41 modifies former certificate bundle information when reading the bundle id value in the preset certificate of authority
Bundle id value;
Step S42, when the authority for the Payload file for getting generation, in modified Payload file to
The corresponding file of signature component title is signed again, generates new signing messages.
When terminal reads the bundle id value in the preset certificate of authority, obtain of original certificate in Payload file
Bundle id value, when determining of original certificate bundle id in the bundle id value in the preset certificate of authority and Payload file
When being worth not identical, of original certificate bundle id value is modified.Bundle id value of original certificate in Payload file is revised as awarding
Bundle id value in warrant book.When terminal gets the authority of Payload file of generation, to be signed group is obtained
The corresponding component to be signed of part title is treated signature component according to authority and is signed again when getting component to be signed
Name, generates new signing messages, for example, terminal is according to com.apple.developer.team- in authority
The form that the value of identifier is set as " former certificate bundle id. corresponds to preset certificate of authority bundle id " will be to be signed
Former certificate bundle id in component is revised as preset certificate of authority bundle id, completes the signature again for treating signature component,
And the signing messages of the preset certificate of authority is generated in component to be signed.
In the present embodiment, terminal is by the bundle id value in the preset certificate of authority and according to the preset certificate of authority
It is middle description file generated authority, in Payload file former certificate bundle id value and component Name pair to be signed
The component to be signed answered is signed again, and generates new signing messages.It is signed, is reduced again without using label tool again
The condition depended degree that application program is signed again.
Referring to Fig. 8, Fig. 8 is the 7th embodiment that the method that application program of the present invention is signed again provides, and is based on above-mentioned Fig. 7 institute
The embodiment shown, step S41 include:
Step S411, when in the bundle id value for getting the preset certificate of authority and former certificate bundle information
When bundle id value, the bundle id value in the bundle id value and former certificate bundle information of the preset certificate of authority is judged
It is whether identical;
Step S412, in the bundle id value for determining bundle id value and the certificate of authority in former certificate bundle information
When not identical, the bundle id value in former certificate bundle information is modified.
When terminal obtains the bundle information of authority by script file, the warrant in bundle information is obtained
Book bundle id value.Terminal obtains former certificate bundle when getting the former certificate bundle information in application attribute list
Bundle id value in information.Judge whether the certificate of authority bundle id value obtained and former certificate bundle id value are identical,
When certificate of authority bundle id value is identical as former certificate bundle id value, determine that application attribute list meets the certificate of authority.
When certificate of authority bundle id value and not identical former certificate bundle id value, determine that application attribute list is unsatisfactory for warrant
Book.When determining that application attribute list is unsatisfactory for the certificate of authority, terminal is applied by the plutil order modification prestored in script
Former certificate bundle information in attribute list.Bundle id value in former certificate bundle information is revised as the certificate of authority
Bundle id value.
Application attribute listing file usually saves in a binary fashion, directly can not obtain effective letter with text mode opening
Breath, can be used plutil order to be checked and be modified, specifically, manplutil order can be used to check, mainly
Change application attribute list (Info.plist) file using this order of plutil replace.It can pass through
plutil-replace CFBundleIdentifier-string BUNDLE_ID Payload/APP_
Bundle id is modified in NAME.app/Info.plist this order.
In the present embodiment, terminal is in the bundle id value and Payload file for getting the preset certificate of authority
When former certificate bundle id value in bundle information, judge in the bundle id value and bundle information of the preset certificate of authority
Former certificate bundle id value it is whether identical, when the preset certificate of authority bundle id value and bundle information in former certificate
When bundle id value is not identical, of original certificate bundle id value is revised as the bundle of the certificate of authority in terminal bundle information
Id value.Bundleid value of original certificate in application program is revised as to the bundle id value of the preset certificate of authority, is avoided using journey
Sequence is unable to run.
In addition, the embodiment of the present invention also proposes that a kind of computer equipment, the computer equipment include: memory, processing
The application program weight signature procedure that device and being stored in can be run on the memory and on the processor, the application program
The step of weight signature procedure realizes the method that application program described in embodiment as above is signed again when being executed by the processor.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium
On be stored with application program weight signature procedure, application program weight signature procedure realizes embodiment as above when being executed by processor
The application program weighs the step of endorsement method.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone,
Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of method that application program is signed again again, which is characterized in that the method that the application program is signed includes:
When receiving directive script, the decompressing files of application program installation kit is obtained;
According to the decompressing files got, the bundle id value and description file in the preset certificate of authority are read;
When modifying the description file, the authority of the decompressing files is generated;
According to the bundle id value in the authority of generation and the preset certificate of authority, to the decompressing files into
Signature generates new signing messages to row again.
2. the method that application program as described in claim 1 is signed again, which is characterized in that described to receive directive script
When, the decompressing files for obtaining application program installation kit includes:
Receive user script command line send when executing instruction, search for application installation kit is simultaneously decompressed;
When application program installation kit decompression, the Payload file of the application program installation kit decompression is obtained;
When the Payload file that scanning is got, component Name to be signed and former card in the Payload file are obtained
Book bundle information.
3. the method that application program as claimed in claim 2 is signed again, which is characterized in that it is described when scanning get it is described
When Payload file, get in the Payload file after component Name to be signed and former certificate bundle information, also
Include:
When getting the component Name to be signed is plugin name or wrist-watch title, the plugin name or wrist-watch name are deleted
The respective file of title.
4. the method that application program as claimed in claim 2 is signed again, which is characterized in that described literary when getting the decompression
When part, the bundle id value and description file in the preset certificate of authority are read, comprising:
When getting Payload file Central Plains certificate bundle information, the former certificate bundle information is detected;
When detecting the bundle id value of the former certificate bundle information, read in the preset certificate of authority
Bundle id value and description file.
5. the method that application program as claimed in claim 4 is signed again, which is characterized in that described when the modification description file
When, generate the authority of the decompressing files, comprising:
When reading the description file, the lattice of preset certificate of authority bundle id value described in the description file are obtained
Formula;
According to the bundle id value of preset modification format and the former certificate bundle information, institute in the description file is modified
The format for stating preset certificate of authority bundle id value, generates the authority of the Payload file.
6. the method that the application program as described in any one of claim 2-5 is signed again, which is characterized in that described according to life
At the authority and the preset certificate of authority in bundle id value, signed again life to the decompressing files
The signing messages of Cheng Xin, comprising:
When reading the bundle id value in the preset certificate of authority, the former certificate bundle information is modified
Bundle id value;
When the authority for the Payload file for getting generation, to be signed in the modified Payload file
The corresponding file of component Name is signed again, generates new signing messages.
7. the method that application program as claimed in claim 6 is signed again, which is characterized in that described when reading described preset award
When bundle id value in warrant book, the bundle id value of the former certificate bundle information is modified, comprising:
Bundle id in the bundle id value and the former certificate bundle information for getting the preset certificate of authority
When value, judge that the bundle id value of the preset certificate of authority and the bundle id value in the former certificate bundle information are
It is no identical;
In the bundle id value for determining the bundle id value in the former certificate bundle information and the certificate of authority not phase
Meanwhile the bundle id value in the modification former certificate bundle information.
8. a kind of device that application program is signed again again, which is characterized in that the device that the application program is signed includes:
Acquiring unit, for when receiving directive script, obtaining the decompressing files of application program;
Reading unit, for according to the decompressing files got, reading the bundle id value in the preset certificate of authority and retouching
State file;
Generation unit is modified, for generating the authority of decompressing files when modifying the description file;
Weight signature unit is right for the bundle id value in the authority and the preset certificate of authority according to generation
The decompressing files is signed again generates new signing messages.
9. a kind of computer equipment, which is characterized in that the computer equipment includes: memory, processor and is stored in described
On memory and the application program weight signature procedure that can run on the processor, application program weight signature procedure is by institute
State the step of realizing the method that the application program as described in any one of claims 1 to 7 is signed again when processor executes.
10. a kind of computer readable storage medium, which is characterized in that be stored on the computer readable storage medium using journey
Sequence weight signature procedure, the application program weight signature procedure are realized when being executed by processor such as any one of claims 1 to 7 institute
The step of application program weight endorsement method stated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910482641.8A CN110321669A (en) | 2019-06-04 | 2019-06-04 | Method, apparatus, equipment and the storage medium that application program is signed again |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910482641.8A CN110321669A (en) | 2019-06-04 | 2019-06-04 | Method, apparatus, equipment and the storage medium that application program is signed again |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110321669A true CN110321669A (en) | 2019-10-11 |
Family
ID=68120174
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910482641.8A Pending CN110321669A (en) | 2019-06-04 | 2019-06-04 | Method, apparatus, equipment and the storage medium that application program is signed again |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110321669A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110659055A (en) * | 2019-10-24 | 2020-01-07 | 四川隧唐科技股份有限公司 | Installation file application program updating method, updating detection method and device |
CN111274459A (en) * | 2020-01-19 | 2020-06-12 | 福建天晴在线互动科技有限公司 | Method and terminal for preventing re-signing of IPA installation package |
CN112148597A (en) * | 2020-09-16 | 2020-12-29 | 北京基调网络股份有限公司 | Method for eliminating iOS device authorization dialog box, test method and storage medium |
CN113094659A (en) * | 2021-03-17 | 2021-07-09 | 青岛海尔科技有限公司 | Method, device, platform equipment and system for publishing application file |
CN113138867A (en) * | 2021-04-20 | 2021-07-20 | 上海上讯信息技术股份有限公司 | Method, device and equipment for realizing communication between application programs |
CN113204354A (en) * | 2021-04-28 | 2021-08-03 | 广州朗国电子科技有限公司 | APP re-signing method, device and storage medium |
CN113569276A (en) * | 2021-06-23 | 2021-10-29 | 北京邮电大学 | Block chain evidence storage method and related equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105574369A (en) * | 2015-12-14 | 2016-05-11 | 网易(杭州)网络有限公司 | Method, device and system for re-signing application program |
CN106845162A (en) * | 2016-12-20 | 2017-06-13 | 北京五八信息技术有限公司 | A kind of heavy endorsement method and device |
-
2019
- 2019-06-04 CN CN201910482641.8A patent/CN110321669A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105574369A (en) * | 2015-12-14 | 2016-05-11 | 网易(杭州)网络有限公司 | Method, device and system for re-signing application program |
CN106845162A (en) * | 2016-12-20 | 2017-06-13 | 北京五八信息技术有限公司 | A kind of heavy endorsement method and device |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110659055A (en) * | 2019-10-24 | 2020-01-07 | 四川隧唐科技股份有限公司 | Installation file application program updating method, updating detection method and device |
CN111274459A (en) * | 2020-01-19 | 2020-06-12 | 福建天晴在线互动科技有限公司 | Method and terminal for preventing re-signing of IPA installation package |
CN111274459B (en) * | 2020-01-19 | 2022-08-09 | 福建天晴在线互动科技有限公司 | Method and terminal for preventing re-signing of IPA installation package |
CN112148597A (en) * | 2020-09-16 | 2020-12-29 | 北京基调网络股份有限公司 | Method for eliminating iOS device authorization dialog box, test method and storage medium |
CN112148597B (en) * | 2020-09-16 | 2021-12-10 | 北京基调网络股份有限公司 | Method for eliminating iOS device authorization dialog box, test method and storage medium |
CN113094659A (en) * | 2021-03-17 | 2021-07-09 | 青岛海尔科技有限公司 | Method, device, platform equipment and system for publishing application file |
CN113138867A (en) * | 2021-04-20 | 2021-07-20 | 上海上讯信息技术股份有限公司 | Method, device and equipment for realizing communication between application programs |
CN113204354A (en) * | 2021-04-28 | 2021-08-03 | 广州朗国电子科技有限公司 | APP re-signing method, device and storage medium |
CN113569276A (en) * | 2021-06-23 | 2021-10-29 | 北京邮电大学 | Block chain evidence storage method and related equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110321669A (en) | Method, apparatus, equipment and the storage medium that application program is signed again | |
CN108845816B (en) | Application program updating method, system, computer device and storage medium | |
CN103336703B (en) | The method of generation upgrade package, server, method for upgrading software, mobile terminal | |
CN103092665B (en) | Immediate updating device and immediate updating method | |
CN105302563B (en) | The plug-in unit method and system of mobile application service | |
CN106295255B (en) | Application program reinforcing method and device | |
CN101706725B (en) | Method and system for loading and debugging relocatable program | |
CN105718313A (en) | Application operation method and device | |
CN104346184A (en) | Application packaging device and application packaging method | |
CN103064666A (en) | Multi-channel method and system for issuing software | |
CN109669692B (en) | Source code sharing method, server, computer readable storage medium and system | |
CN103761107B (en) | Software package customizing device and method | |
WO2013189223A1 (en) | Mail sending method and device | |
CN107463405B (en) | Application program updating method and device | |
CN111563015A (en) | Data monitoring method and device, computer readable medium and terminal equipment | |
CN106371881A (en) | Method and system for updating program versions in servers | |
WO2019029451A1 (en) | Method for publishing mobile applications and electronic apparatus | |
CN109857432A (en) | A kind of hot update method and device of game application | |
CN106776266A (en) | The collocation method and terminal device of testing tool | |
CN110928571A (en) | Business program development method and device | |
CN113268245A (en) | Code analysis method, device and storage medium | |
CN106330561A (en) | Dynamic UI setting method and apparatus | |
CN113138768A (en) | Application package generation method and device, electronic equipment and readable storage medium | |
CN113760733A (en) | Unit testing method and device | |
CN113127000A (en) | Compiling method, device and equipment of application program assembly and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |