Automatic signature method and system
An automatic and signature file technology, applied in the direction of instruments, electronic digital data processing, platform integrity maintenance, etc., can solve the problems of unguaranteed sub-file signatures, errors, complicated operation process, etc., to improve signature accuracy and signature efficiency, Ensure the accuracy of the signature and avoid the effect of repeated signatures
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2017-03-22
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention relates to the field of signatures, in particular to an automatic signature method and system thereof. Background technique
[0002] The current anti-virus software will judge certain behaviors based on whether there is a normal signature certificate as a judgment condition. Therefore, for some operations of normal software without signature, the antivirus software will pop up a box to prompt suspicious behavior. Let users think that the software is dangerous, affect the user experience, and also affect the promotion of the software.
[0003] A complete program product contains many PE files, such as the main program EXE, dynamic library DLL, and possible driver file SYS. There may be tens to hundreds of files that need to be signed under such a product. If you manually sign the files one by one, it will be a waste of time, and you may miss a file due to too many manual operations and release it to the market. Later, because a file is ...
Examples
Embodiment 1
[0086] Please refer to figure 2 , this embodiment provides an automatic signature method, which realizes automatic and accurate signing of multiple documents to be signed at the same time, which can not only avoid repeated signatures, but also avoid missing signatures; The signing status of the file.
[0087] Specifically, the method of this embodiment may include the following steps:
[0088] S1: Create a named pipe;
[0089] Preferably, a readable and writable named pipe can be created through the CreatePipe function, and the CreatePipe function is a system API;
[0090] S2: Add the file to be signed in PE format to the list of files to be signed;
[0091] Specifically, you can open the file through the CreateFile function, read the first two bytes of the file, and judge whether it is equal to 0x4D\0x5A; if it is equal, it is a PE format file; further, judge whether it has been signed according to the configuration file of the file , if the file is not signed, it is add...
Embodiment 2
[0108] Please refer to image 3 , Figure 4 and Figure 5 , this embodiment is a further extension on the basis of Embodiment 1, the similarities will not be repeated, the difference is:
[0109] The S2 specifically includes the following sub-steps:
[0110] S01: Determine whether the acquired data is a file or a folder according to the character string; if it is a folder, execute S02; if it is a file, execute S03;
[0111] S02: traverse all the files in the folder, obtain the file in PE format according to the first two bytes of the file, and add it to the folder to be signed; then execute S03;
[0112] S03: Determine whether the obtained file in PE format has been signed according to the configuration file; if not, add the file as a file to be signed to the list of files to be signed; the list of files to be signed is in the form of a linked list.
[0113] After 2 in said S42, it also includes:
[0114] 2.1: Determine whether it is necessary to time stamp the file to be...
Embodiment 3
[0120] see Figure 7 , this embodiment is an automatic signature system provided on the basis of Embodiment 1 and Embodiment 2, including:
[0121] Create module 1 for creating named pipes;
[0122] Add module 2, which is used to add the file to be signed in PE format to the list of files to be signed;
[0123] The first obtaining module 3 is used to sequentially obtain a file to be signed from the list of files to be signed;
[0124] The signature module 4 is used to sign the file to be signed, and obtain the signature information generated during the signature process through the named pipe;
[0125] A judging module 5, configured to judge whether the signature file is successfully signed according to the signature information;
[0126] The second obtaining module 6 is configured to mark the one signature file or remove the one signature file from the list of files to be signed, and simultaneously obtain the next file to be signed.
[0127] Described signature module 4 c...