CN103218242B - A kind of method of automatic renewal - Google Patents

A kind of method of automatic renewal Download PDF

Info

Publication number
CN103218242B
CN103218242B CN201310138487.5A CN201310138487A CN103218242B CN 103218242 B CN103218242 B CN 103218242B CN 201310138487 A CN201310138487 A CN 201310138487A CN 103218242 B CN103218242 B CN 103218242B
Authority
CN
China
Prior art keywords
file
downloader
configuration item
default
download
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.)
Active
Application number
CN201310138487.5A
Other languages
Chinese (zh)
Other versions
CN103218242A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201310138487.5A priority Critical patent/CN103218242B/en
Publication of CN103218242A publication Critical patent/CN103218242A/en
Application granted granted Critical
Publication of CN103218242B publication Critical patent/CN103218242B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method of automatic renewal, belong to information security field.Described method comprises: downloader from Download Server end download configuration file, and carries out resolving and obtains signature value and all configuration items; Signature value is verified, be proved to be successful, obtain the current configuration item in all configuration items and resolve, obtain the Download Info of current configuration item, judge whether current configuration item meets update condition according to Download Info, if do not met, then order resolves next configuration item, if met, then download corresponding new file, if need to upgrade signature file, then download corresponding signature file and sign test, sign test success, then perform corresponding renewal rewards theory according to presetting executive mode, order resolves next configuration item, sign test is unsuccessful, terminates.Adopt scheme of the present invention can realize, when minority file needs to upgrade, only needing to upgrade minority file, reduce the use of bandwidth, and update mode being more flexible.<!--1-->

Description

A kind of method of automatic renewal
Technical field
The present invention relates to information security field, particularly relate to a kind of method of automatic renewal.
Background technology
Due to software upgrading in conventional mounting bag manufacturing process, often cause the regenerating of installation kit, issue, when software upgrading speed is very fast, just there will be the situation of installation kit frequent updating.In large software system, it is many especially that content installed by software, complex manufacturing process, when minority file needs to upgrade, needs to download whole installation kit, understand waste bandwidth like this, and update mode is dumb.
Summary of the invention
The object of the invention is to solve the deficiencies in the prior art, providing a kind of method of automatic renewal.
The technical solution used in the present invention is: a kind of method of automatic renewal, is characterized in that, comprising:
Step 101: downloader is from Download Server end download configuration file, and described configuration file is resolved, obtain signature value, described signature value is verified, if be proved to be successful, then resolved described configuration file and obtain all configuration items, perform step 102, if authentication failed, then terminate;
Step 102: described downloader obtains current configuration item from described all configuration items, and parsing is carried out to described current configuration item obtain Download Info, according to described Download Info, judge whether the local file corresponding with current configuration item meets update condition, if, then perform step 103, otherwise perform step 104;
Wherein, described Download Info comprise file name, operating system version, operating system framework, IE version, installation directory, operational factor, executive mode, downloading mode, the need of certifying signature, release type, FileVersion, registration table version;
Step 103: described downloader is according to the file name of described Download Info and installation directory, from the position that the new file download corresponding with described current configuration item is specified to described installation directory by server end, judge that described new file is the need of certifying signature, if do not needed, then directly perform step 104, if needed, then download corresponding signature file, and sign test operation is performed to described signature file, if sign test success, then described downloader performs corresponding operating according to default executive mode, performs step 104, if sign test is unsuccessful, then terminate;
Step 104: described downloader judges whether also have untreated configuration item in described configuration file, if so, then next configuration item in sequential processes configuration file, returns step 102, otherwise this update time and update cycle are kept in default memory block, upgrade and terminate;
Also comprise before described step 101:
Step 101-1: described downloader searches update time in described default memory block and update cycle, judges whether to meet update condition, if so, then performs step 101-2, otherwise terminates;
Step 101-2: described downloader judges whether to be connected to described Download Server, if so, then performs step 101-3, otherwise terminates;
Step 101-3: described downloader judges whether successfully download described configuration file from described Download Server end, if so, then performs step 101, otherwise terminates;
Described step 101-1 is specially: described downloader searches update time and update cycle from described default memory block, the difference of computing system time and update time, the result obtained and update cycle compare, if be more than or equal to the update cycle, then represent that downloader meets update condition, perform step 101-2, otherwise represent still within the update cycle, terminate;
Described step 101-2 is specially: described downloader calling system application programming interface, obtain rreturn value, and described rreturn value is returned to described downloader, if described rreturn value is the first default value, then represent and connect Download Server success, otherwise represent the failure of connection Download Server;
In described step 101, described described configuration file to be resolved, also comprise: described downloader is resolved described configuration file, and whether judge to resolve the content obtained legal;
In described step 101, described downloader carries out checking to described signature value and is specially: described downloader, according to default PKI, signature algorithm, configuration file and signature value, uses default signature verification algorithm to verify;
Described Download Info also comprises document architecture, performs stand-by period and registry directory;
Described according to described Download Info, judge whether the local file corresponding with current configuration item meets update condition, is specially:
Step 102-1: described downloader is according to the downloading mode of configuration item current in described Download Info, judge the type of described downloading mode, if described downloading mode is the first default downloading mode, then perform step 102-2, if described downloading mode is the second default downloading mode, then perform step 102-5, otherwise terminate;
Step 102-2: described downloader, according to the installation directory of configuration item current in described Download Info and file name, judges whether the local file corresponding with current configuration item exists, if so, then performs step 102-3, otherwise performs step 104;
Step 102-3: described downloader compares according to the operating system version of configuration item current in described Download Info, operating system framework and IE version and local operating system version, operating system framework and IE version, judge whether the local file corresponding with current configuration item meets system condition, if, then perform step 102-4, otherwise perform step 104;
Step 102-4: described downloader is according to the executive mode of configuration item current in described Download Info, obtain the type of described executive mode in default executive mode, and perform corresponding operating, if can run succeeded according to default executive mode, then perform step 104, otherwise terminate;
Step 102-5: described downloader compares according to the operating system version of configuration item current in described Download Info, operating system framework and IE version and local operating system version, operating system framework and IE version, judge whether the local file corresponding with current configuration item meets update condition, if, then perform step 102-6, otherwise perform step 104;
Step 102-6: described downloader is according to the release type of configuration item current in described Download Info, judge the type needing the local version obtained, if the release type of current configuration item is the first default release type, then perform step 102-7, if the release type of current configuration item is the second default release type, then perform step 102-8, if the release type of current configuration item is the 3rd default release type, then represent and do not need to compare release type, perform step 103, otherwise terminate;
Step 102-7: described downloader is according to the FileVersion of configuration item current in described Download Info, local file version is read from this locality, judge whether local file version meets the FileVersion of current configuration item, if, then perform step 103, otherwise represent that local file does not need to upgrade, perform step 104;
Step 102-8: described downloader is according to the registration table version of configuration item current in described Download Info, version number is inquired about from local registration table, judge whether described version number meets the registration table version of current configuration item, if, then perform step 103, otherwise represent that the local file corresponding with current configuration item does not need to upgrade, perform step 104;
Described in described step 102-1, first presets downloading mode and downloads for not needing, and only for performing, described second presets downloading mode for downloading meeting under update condition;
Described default executive mode comprises: first presets executive mode, represents a updating file, does not need to perform other operations after renewal, second presets executive mode, represents registration, and the 3rd presets executive mode, represent anti-registration, the 4th presets executive mode, represents that the described operational factor of band is run;
In described step 102-6, the described first default release type is FileVersion type, and the described second default release type is registration table release type, and the described 3rd presets release type for not need to compare release type;
In described step 103, the described new file of described judgement is the need of certifying signature, can also be: downloader judges whether new file is the file meeting PE structure, if so, then certification authentication is carried out to described new file, if the verification passes, then perform step 104, otherwise authentication failed, terminates, otherwise directly performs step 104;
In described step 103, the described new file of described judgement, the need of certifying signature, can also be:
Steps A: downloader judges that whether new file is the file of PE structure, if so, then carries out certification authentication to new file, performs step B, otherwise downloads corresponding signature file, performs step C;
Step B: downloader carries out certification authentication to new file, if be proved to be successful, then performs step 104, otherwise then authentication failed, terminates;
Step C: downloader is verified described signature file, if be proved to be successful, then performs step 104, otherwise authentication failed, terminate;
In described step 103, the described new file of described judgement, the need of certifying signature, is specially: described downloader, according to " the need of the certifying signature " of configuration item current in described Download Info, judges that described new file is the need of certifying signature;
In described step 103, the described signature file downloading correspondence, and sign test operation is carried out to described signature file, be specially: described downloader, according to default PKI, signature algorithm, new file and signature file, uses default signature verification algorithm to verify;
In described step 103, described downloader performs corresponding operating according to default executive mode, also comprises:
Step S11: described downloader judges whether the local file corresponding with current configuration item exists, if so, then performs step S12, otherwise will the new file download upgraded be needed in predetermined directory, and performs according to default executive mode;
Step S12: described downloader judges whether the local file corresponding with current configuration item runs, if so, then performs step S13, otherwise will the new file download upgraded be needed in predetermined directory, and performs according to default executive mode;
Step S13: the described downloader pair local file corresponding with current configuration item carries out rename operation, judge whether can rename successfully, if, then will the new file download upgraded be needed in predetermined directory, and perform according to default executive mode, otherwise prompting local file runs, cannot installation procedure;
Described step S13 can also be: described downloader performs corresponding operating according to default executive mode, lastest imformation is write in provisional registration table, as the system reboots, according to the content in described provisional registration table, completes the installation of new file.
The beneficial effect that the present invention obtains is: adopt technical scheme of the present invention can realize, when minority file needs to upgrade, not needing to download whole installation kit, only needing to upgrade minority file, reduce the use of bandwidth, and update mode is more flexible.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method for a kind of automatic renewal that the embodiment of the present invention 1 provides;
Fig. 2 is the refinement process flow diagram of step 107 in the embodiment of the present invention 1;
Fig. 3 is the refinement process flow diagram of step 116 in the embodiment of the present invention 1.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment 1
Embodiments of the invention 1 provide a kind of method of automatic renewal, as shown in Figure 1, comprising:
Step 101: downloader is from Download Server end download configuration file;
In the present embodiment, preferably, described downloader is present in mobile device, then, when mobile device is connected with main frame, automatically start downloader, and in addition, described downloader can also exist with main frame;
Also comprise step 101-1 before step 101 to step 101-3:
Step 101-1: described downloader judges whether to meet update condition, if so, then performs step 101-2, otherwise terminates;
Concrete, described downloader searches update time and update cycle from default memory block, the difference of computing system time and update time, the result obtained and update cycle compare, if be more than or equal to the update cycle, then represent that downloader meets update condition, performs step 101-2, otherwise represent still within the update cycle, terminate;
In the present embodiment, preferably, the unit of update cycle UpdatePeriod is sky, and update time is the time be updated successfully last time;
Preferably, presetting the path of memory block is: HKEY_LOCAL_MACHINE SOFTWARE Wow6432Node EnterSafe AutoUpdate " UpdatePeriod "=REG_DWORD:00000005 " Time "=REG_SZ: " 2013.01.08 ", search that to obtain being updated successfully the time last time be 2013.01.08, update cycle is UpdatePeriod=5, if system time is 2013.01.13, be then 5 days with the difference of update time, be greater than the update cycle, then represent and meet update condition;
Step 101-2: downloader judges whether to be connected to Download Server, if so, then performs step 101-3, otherwise terminates;
Wherein, judge whether that the method that can be connected to Download Server is specially, downloader calling system API (ApplicationProgrammingInterface, application programdLL (dynamic link library)), obtain rreturn value, and rreturn value is returned to downloader, if rreturn value is the first default value, then represents and connect Download Server success, otherwise represent the failure of connection Download Server;
Preferably, the first default value can be 1;
Step 101-3: downloader judge whether can from Download Server successful download configuration file, if so, then perform step 101, otherwise terminate;
Described configuration file leaves in Download Server, and when meeting update condition, downloader is downloaded from Download Server end and obtained configuration file, and under described configuration file is downloaded to temp directory;
Such as, in the present embodiment, downloader is downloaded from Download Server end the configuration file obtained and is:
[FileList]
Certd.exe=all;all;all;x86;6;3;-t;0;d0;0;all;file;null;REG32[HKEY_LOCAL_MACHINE\SOFTWARE\EnterSafe\ePass2000Auto_std\path];
Csp11.dll=all;all;all;x86;3;0;null;0;d1;1;1.0.13.0105;file;null;null;
Csp11_s.dll=all;all;all;x86;3;0;null;0;d1;1;1.0.13.0105;file;null;null
X64/csp11.dll=all;x64;all;x64;4;0;null;0,d1;1,1.0.13.105;file;null;null;
X64/csp11_s.dll=all;x64;all;x64;4;0;null;0,d1;1;1.0.13.105;file;null;null;
Lang/certd_2052.lng=all;all;all;x86;6;0,NULL,0,d1;0;all;file;null;reg32[HKEY_LOCAL_MACHINE\SOFTWARE\EnterSafe\ePass2000Auto_std\path][lang];
[Settings]
UpdatePeriod=5;
[sig]
sig=af530a6636a2ac516e99b4f8d9cce3331474b42b103c8fbb62c14a6f5b524118b335f77f58a0450a4daa80bea501c9ea12740053486407b8fa7baa3d73b108c4099f8467002217fd8656da16d4cc2eb29b5c292be6881b44b85fce70af3c4afdb0831d77f981542aa1c35e1e1a19d637f0b3c13683fbfff211f1866eeafc2eab;
The all configuration items comprised in described configuration file are:
Certd.exe=all;all;all;x86;6;3;-t;0;d0;0;all;file;null;REG32[HKEY_LOCAL_MACHINE\SOFTWARE\EnterSafe\ePass2000Auto_std\path];
Csp11.dll=all;all;all;x86;3;0;null;0;d1;1;1.0.13.0105;file;null;null;
Csp11_s.dll=all;all;all;x86;3;0;null;0;d1;1;1.0.13.0105;file;null;null
X64/csp11.dll=all;x64;all;x64;4;0;null;0,d1;1,1.0.13.105;file;null;null;
X64/csp11_s.dll=all;x64;all;x64;4;0;null;0,d1;1;1.0.13.105;file;null;null;
Lang/certd_2052.lng=all;all;all;x86;6;0,NULL,0,d1;0;all;file;null;reg32[HKEY_LOCAL_MACHINE\SOFTWARE\EnterSafe\ePass2000Auto_std\path][lang];
Wherein, Certd.exe=all; All; All; X86; 6; 3;-t; 0; D0; 0; All; File; Null; REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]; For the configuration item of in configuration file;
UpdatePeriod=5; It is the update cycle of configuration file;
Sig=af530a6636a2ac516e99b4f8d9cce3331474b42b103c8fbb62c1 4a6f5b524118b335f77f58a0450a4daa80bea501c9ea127400534864 07b8fa7baa3d73b108c4099f8467002217fd8656da16d4cc2eb29b5c 292be6881b44b85fce70af3c4afdb0831d77f981542aa1c35e1e1a19 d637f0b3c13683fbfff211f1866eeafc2eab; For the signature value of configuration file;
Step 102: downloader is resolved described configuration file, obtains signature value;
Each configuration item in described configuration file can both a corresponding signature file, and what deposit in wherein said signature file is utilize the result preset private key and sign to configuration file;
Step 103: described downloader is verified described signature value, if be proved to be successful, then resolves described configuration file, obtains all configuration items, performs step 104, if authentication failed, then returns the information of authentication failed, terminates;
In the present embodiment, described downloader carries out checking be specially resolving the signature value that obtains of described configuration file: described downloader, according to default PKI, signature algorithm, configuration file and signature value, uses default signature verification algorithm to verify;
Wherein, in addition described signature algorithm preferably RSA Algorithm can also be SM2 algorithm etc.;
Such as, a configuration item in configuration file is, Certd.exe=all, all, all, x86, 6, 3,-t, 0, d0, 0, all, file, null, REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path], wherein this configuration item comprises file name (Certd.exe), operating system version (all), operating system framework (all), IE version (all), document architecture (x86), installation directory (6), executive mode (3), operational factor (-t), perform the stand-by period (0), downloading mode (d0), the need of certifying signature (0), release type (all), FileVersion (file), registration table version (null), registry directory (REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]),
Described step 103 also comprises: judge that whether the content obtained after resolving configuration file is legal, if so, then performs step 104, otherwise returns error message, terminate;
Resolve that the content that obtains is illegal specifically to be comprised: resolve the configuration item that obtains for empty, the content of resolving the configuration item obtained does not meet preset content, do not resolve and obtain signature value or signature value for empty etc.;
Step 104: described downloader obtains current configuration item from described all configuration items, and parsing is carried out to described current configuration item obtain Download Info;
In the present embodiment, described Download Info comprise file name, operating system version, operating system framework, IE version, document architecture, installation directory, executive mode, operational factor, the execution stand-by period, downloading mode, the need of certifying signature, release type, FileVersion, registration table version, registry directory;
Described step 104 also comprises: judge whether described Download Info meets preset format, if so, then performs step 105, otherwise terminates;
Step 105: described downloader is according to the downloading mode of configuration item current in described Download Info, judge the type of described downloading mode, if the downloading mode of current configuration item is the first default downloading mode, then perform step 106, if the downloading mode of current configuration item is the second default downloading mode, then perform step 109;
Described step 105 also comprises, if the downloading mode of current configuration item is not neither the first default downloading mode is again the second default downloading mode, then represents that current configuration item does not meet preset format, terminates;
Wherein, first presets downloading mode represents and does not need down loading updating, only for performing, and preferably d0, second presets downloading mode represents and only to download meeting under update condition, preferably d1;
Such as, if the current configuration item in configuration file is Certd.exe=all; All; All; X86; 6; 3;-t; 0; D0; 0; All; File; Null; REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]; Then downloading mode is d0, and expression does not need more newly downloaded, only for performing, then performs step 106;
Such as, if the current configuration item in the configuration file in step 101 is Csp11.dll=all; All; All; X86; 3; 0; Null; 0; D1; 1; 1.0.13.0105; File; Null; Null; Then downloading mode is d1, represents only to download meeting under update condition, then perform step 109;
Step 106: described downloader, according to the installation directory of configuration item current in described Download Info and file name, judges whether the local file corresponding with current configuration item exists, if so, then performs step 107, otherwise performs step 117;
In the present embodiment, the installation directory of described configuration file comprises two kinds, one is NULL, represent that local file does not exist, then perform step 117, preferably REG32|REG64 [registration table path] [follow-up catalogue], wherein, REG32|REG64 represents 32 registration tablies or 64 registration tablies to another kind of installation directory;
Step 107: described downloader compares according to the operating system version of configuration item current in described Download Info, operating system framework and IE version and local operating system version, operating system framework and IE version, judge whether current configuration item meets system condition, if, then perform step 108, otherwise perform step 117;
As shown in Figure 2, specifically comprise:
Steps A: judge whether the operating system version of current configuration item mates with native operating sys-tern version, if so, then performs step B, otherwise performs step 117;
Such as, if the current configuration item of configuration file is Certd.exe=all; All; All; X86; 6; 3;-t; 0; D0; 0; All; File; Null; REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]; Then operating system version is all, represents that the operation version of main frame meets system condition;
Step B: judge whether the operating system framework of current configuration item mates with native operating sys-tern framework, if so, then performs step C, otherwise performs step 117;
In the present embodiment, in described configuration file, the operating system framework of configuration item can be x86, x64 or all;
Such as, if the current configuration item of configuration file is Certd.exe=all; All; All; X86; 6; 3;-t; 0; D0; 0; All; File; Null; REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]; Then operating system version is all, represents that the operating system framework of main frame all meets system condition;
Step C: judge whether the IE version of current configuration item mates with local IE version, if so, then performs step 108, otherwise performs step 117;
In the present embodiment, the IE version of described configuration file can be E, G, L, &, |, all etc., when wherein E represents that the IE version of main frame is identical with the IE version of configuration file, meet update condition, all represents that the IE version of main frame all meets system condition;
Such as, when the current configuration item of configuration file in step 101 is Certd.exe=all; All; All; X86; 6; 3;-t; 0; D0; 0; All; File; Null; REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]; IE is all, represents that the IE version of main frame all meets update condition;
Wherein, compare the operating system version of current configuration item in configuration file, operating system framework and IE version can perform with local operating system version, operating system framework and IE version simultaneously;
Step 108: described downloader, according to the executive mode of configuration item current in described Download Info, obtains the type of described executive mode in default executive mode, and perform corresponding operating according to default executive mode, perform step 117;
Wherein, described step 108 also comprises: judge whether described executive mode belongs to the type in default executive mode, if do not belonged to, then terminating, if belonged to, then performing corresponding operating according to presetting executive mode, performing step 117 when running succeeded, terminating when performing unsuccessful;
In the present embodiment, obtain the type of described executive mode in default executive mode, be specially:
Judge whether the executive mode of described current configuration item belongs to the type in default executive mode, wherein, described default executive mode has 4 kinds, be respectively: first presets executive mode, preferably 0, represent a updating file, do not need after renewal to perform other operations; Second presets executive mode, preferably 1, represents registration; 3rd presets executive mode, preferably 2, represents anti-registration, wherein, instead registers and is unloading; 4th presets executive mode, preferably 3, represents and runs; If the executive mode of current configuration item does not belong to default executive mode, then terminate;
Such as, if the current configuration item in configuration file is Certd.exe=all; All; All; X86; 6; 3;-t; 0; D0; 0; All; File; Null; REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]; Then executive mode is the 4th default executive mode 3, represents and runs;
Step 109: described downloader compares according to the operating system version of configuration item current in described Download Info, operating system framework and IE version and local operating system version, operating system framework and IE version, judge whether current configuration item meets update condition, if, then perform step 110, otherwise perform step 117;
Concrete identical with the operation of step 107, do not repeat them here;
Step 110: described downloader is according to the release type of configuration item current in described Download Info, judge the type needing the local version obtained, if the release type of current configuration item is the first default release type, then perform step 111, if the release type of current configuration item is the second default release type, then perform step 112, if the release type of current configuration item is the 3rd default release type, then represent and do not need to compare release type, perform step 113;
Described step 110 also comprises: if the release type of current configuration item is not the first default release type or second preset release type or the 3rd default release type, then represents and do not meet preset format, then terminate;
In the present embodiment, the first default release type is FileVersion type, preferably file, second default release type is registration table release type, preferably REG, and the 3rd default release type represents and do not need to compare release type, all release types all satisfy condition, preferably all;
Such as, if the current configuration item in configuration file is Certd.exe=all; All; All; X86; 6; 3;-t; 0; D0; 0; All; File; Null; REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]; Then the release type of current configuration item is all, represents and does not need to compare release type, performs step 113;
If the current configuration item in configuration file is Csp11.dll=all; All; All; X86; 3; 0; Null; 0; D1; 1; 1.0.13.0105; File; Null; Null; Then the release type of current file is 1.0.13.0105, if represent that the release type of local file is less than 1.0.13.0105, then needs to upgrade, performs step 111, if the release type of local file is more than or equal to 1.0.13.0105, then does not need to upgrade;
Step 111: described downloader is according to the FileVersion of configuration item current in described Download Info, local file version is read from this locality, judge whether local file version meets the FileVersion of current configuration item, if, then perform step 113, otherwise represent that local file does not need to upgrade, perform step 117;
Step 112: described downloader is according to the registration table version of configuration item current in described Download Info, version number is inquired about from local registration table, judge whether local version number meets the registration table version of current configuration item, if, then perform step 113, otherwise represent that local file does not need to upgrade, perform step 117;
Step 113: described downloader according to the file name of described Download Info and installation directory, from the position that the new file download corresponding with described current configuration item is specified to described installation directory by server end;
Step 114: downloader is according to " the need of the certifying signature " of configuration item current in described Download Info, judge that the signature file corresponding with described current configuration item is the need of renewal, if so, then download corresponding signature file, perform step 115, otherwise perform step 116;
Such as, if the current configuration item in configuration file is Certd.exe=all; All; All; X86; 6; 3;-t; 0; D0; 0; All; File; Null; REG32 [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std path]; Then in current configuration item, " the need of certifying signature " is 0, represents and does not need to upgrade signature file;
Step 115: downloader performs sign test operation to downloading the signature file obtained, if sign test success, then performs step 116, if sign test failure, then terminates;
Described to the operation of described signature file execution sign test, specifically comprise: according to default signature algorithm, signature operation is done to the described new file upgraded that needs, obtain signature value, the signature file that the signature value obtained and download obtain is compared, if consistent, then represent sign test success, otherwise represent sign test failure;
In the present embodiment, realize preferably by the mode of step 114 with step 115, in addition can also be:
Scheme one: downloader judges whether new file is the file meeting PE structure, if so, then carries out certification authentication to described new file, if the verification passes, then performs step 116, otherwise authentication failed, terminate, otherwise directly perform step 116;
In described steps A 1, the file meeting PE structure can be .exe file .dll file etc.;
Scheme two: downloader judges that whether new file is the file of PE structure, if so, then carries out certification authentication to new file, if the verification passes, then perform step 116, if checking is not passed through, then authentication failed, terminate, otherwise download corresponding signature file, perform step 115;
Step 116: downloader, according to the executive mode of configuration item current in described Download Info, obtains the type of described executive mode in default executive mode, and perform corresponding operating according to default executive mode, perform step 117;
Described step 116 also comprises: if can run succeeded according to default executive mode, then perform step 117, otherwise terminates;
Wherein, described downloader performs corresponding operating according to default executive mode, also comprises, as shown in Figure 3:
Step S1: judge to need the original upgraded whether to exist, if so, then perform step S2, otherwise perform corresponding operating according to default executive mode;
Step S2: judge to need the original upgraded whether to run, if so, then perform step S3, otherwise perform corresponding operating according to default executive mode;
Step S3: to needing the original upgraded to carry out rename operation, judge whether can rename successfully, if so, then performs corresponding operating according to default executive mode, otherwise prompting file running cannot installation procedure;
In the present embodiment, step S3 can replace with: perform according to default executive mode, lastest imformation is write in provisional registration table, as the system reboots, according to provisional registration table content, completes the installation of new file;
Step 117: judge whether also have untreated configuration item in described configuration file, if so, then next configuration item in sequential processes configuration file, returns and performs step 104, otherwise this update time and update cycle are kept in default memory block, upgrade and terminate;
Concrete, revise according to this update time or create new registry entry;
Such as: [HKEY_LOCAL_MACHINE SOFTWARE EnterSafe ePass2000Auto_std] " UpdatePeriod "=dword:00000005 " Time "=" 2013.01.10 ", by this upgrade time 2013.01.10 and update cycle dword:00000005 be kept in default memory block.

Claims (16)

1. the method automatically upgraded, is characterized in that, comprising:
Step 101: downloader is from Download Server end download configuration file, and described configuration file is resolved, obtain signature value, described signature value is verified, if be proved to be successful, then resolved described configuration file and obtain all configuration items, perform step 102, if authentication failed, then terminate;
Step 102: described downloader obtains current configuration item from described all configuration items, and parsing is carried out to described current configuration item obtain Download Info, according to described Download Info, judge whether the local file corresponding with current configuration item meets update condition, if, then perform step 103, otherwise perform step 104;
Wherein, described Download Info comprise file name, operating system version, operating system framework, IE version, installation directory, operational factor, executive mode, downloading mode, the need of certifying signature, release type, FileVersion, registration table version;
Step 103: described downloader is according to the file name of described Download Info and installation directory, from the position that the new file download corresponding with described current configuration item is specified to described installation directory by server end, judge that described new file is the need of certifying signature, if do not needed, then directly perform step 104, if needed, then download corresponding signature file, and sign test operation is performed to described signature file, if sign test success, then described downloader performs corresponding operating according to default executive mode, performs step 104, if sign test is unsuccessful, then terminate;
Step 104: described downloader judges whether also have untreated configuration item in described configuration file, if so, then next configuration item in sequential processes configuration file, returns step 102, otherwise this update time and update cycle are kept in default memory block, upgrade and terminate;
In described step 103, described downloader performs corresponding operating according to default executive mode, also comprises:
Step S11: described downloader judges whether the local file corresponding with current configuration item exists, if so, then performs step S12, otherwise will the new file download upgraded be needed in predetermined directory, and performs according to default executive mode;
Step S12: described downloader judges whether the local file corresponding with current configuration item runs, if so, then performs step S13, otherwise will the new file download upgraded be needed in predetermined directory, and performs according to default executive mode;
Step S13: the described downloader pair local file corresponding with current configuration item carries out rename operation, judge whether can rename successfully, if, then will the new file download upgraded be needed in predetermined directory, and perform according to default executive mode, otherwise prompting local file runs, cannot installation procedure.
2. method according to claim 1, is characterized in that, also comprises before described step 101:
Step 101-1: described downloader searches update time in described default memory block and update cycle, judges whether to meet update condition, if so, then performs step 101-2, otherwise terminates;
Step 101-2: described downloader judges whether to be connected to described Download Server, if so, then performs step 101-3, otherwise terminates;
Step 101-3: described downloader judges whether successfully download described configuration file from described Download Server end, if so, then performs step 101, otherwise terminates.
3. method according to claim 2, it is characterized in that, described step 101-1 is specially: described downloader searches update time and update cycle from described default memory block, the difference of computing system time and update time, the result obtained and update cycle compare, if be more than or equal to the update cycle, then represent that downloader meets update condition, perform step 101-2, otherwise represent still within the update cycle, terminate.
4. method according to claim 2, it is characterized in that, described step 101-2 is specially: described downloader calling system application programming interface, obtain rreturn value, and described rreturn value is returned to described downloader, if described rreturn value is the first default value, then represents and connect Download Server success, otherwise represent the failure of connection Download Server.
5. method according to claim 1, is characterized in that, in described step 101, describedly to resolve described configuration file, also comprises: described downloader is resolved described configuration file, and whether judge to resolve the content obtained legal.
6. method according to claim 1, it is characterized in that, in described step 101, described downloader carries out checking to described signature value and is specially: described downloader, according to default PKI, signature algorithm, configuration file and signature value, uses default signature verification algorithm to verify.
7. method according to claim 1, is characterized in that, described Download Info also comprises document architecture, performs stand-by period and registry directory.
8. method according to claim 1, is characterized in that, in described step 102, described according to described Download Info, judges whether the local file corresponding with current configuration item meets update condition, is specially:
Step 102-1: described downloader is according to the downloading mode of configuration item current in described Download Info, judge the type of described downloading mode, if described downloading mode is the first default downloading mode, then perform step 102-2, if described downloading mode is the second default downloading mode, then perform step 102-5, otherwise terminate;
Step 102-2: described downloader, according to the installation directory of configuration item current in described Download Info and file name, judges whether the local file corresponding with current configuration item exists, if so, then performs step 102-3, otherwise performs step 104;
Step 102-3: described downloader compares according to the operating system version of configuration item current in described Download Info, operating system framework and IE version and local operating system version, operating system framework and IE version, judge whether the local file corresponding with current configuration item meets system condition, if, then perform step 102-4, otherwise perform step 104;
Step 102-4: described downloader is according to the executive mode of configuration item current in described Download Info, obtain the type of described executive mode in default executive mode, and perform corresponding operating, if can run succeeded according to default executive mode, then perform step 104, otherwise terminate;
Step 102-5: described downloader compares according to the operating system version of configuration item current in described Download Info, operating system framework and IE version and local operating system version, operating system framework and IE version, judge whether the local file corresponding with current configuration item meets update condition, if, then perform step 102-6, otherwise perform step 104;
Step 102-6: described downloader is according to the release type of configuration item current in described Download Info, judge the type needing the local version obtained, if the release type of current configuration item is the first default release type, then perform step 102-7, if the release type of current configuration item is the second default release type, then perform step 102-8, if the release type of current configuration item is the 3rd default release type, then represent and do not need to compare release type, perform step 103, otherwise terminate;
Step 102-7: described downloader is according to the FileVersion of configuration item current in described Download Info, local file version is read from this locality, judge whether local file version meets the FileVersion of current configuration item, if, then perform step 103, otherwise represent that local file does not need to upgrade, perform step 104;
Step 102-8: described downloader is according to the registration table version of configuration item current in described Download Info, version number is inquired about from local registration table, judge whether described version number meets the registration table version of current configuration item, if, then perform step 103, otherwise represent that the local file corresponding with current configuration item does not need to upgrade, perform step 104.
9. method according to claim 8, is characterized in that, described in described step 102-1, first presets downloading mode and download for not needing, and only for performing, described second presets downloading mode for downloading meeting under update condition.
10. according to the method described in claim 1 or 8, it is characterized in that, described default executive mode comprises: first presets executive mode, represents a updating file, does not need to perform other operations after renewal, second presets executive mode, represent registration, the 3rd presets executive mode, represents anti-registration, 4th presets executive mode, represents that the described operational factor of band is run.
11. methods according to claim 8, it is characterized in that, in described step 102-6, the described first default release type is FileVersion type, described second default release type is registration table release type, and the described 3rd presets release type for not need to compare release type.
12. methods according to claim 1, it is characterized in that, in described step 103, the described new file of described judgement is the need of certifying signature, can also be: downloader judges whether new file is the file meeting PE structure, if so, then certification authentication is carried out to described new file, if the verification passes, then perform step 104, otherwise authentication failed, terminates, otherwise directly performs step 104.
13. method according to claim 1, is characterized in that, in described step 103, the described new file of described judgement, the need of certifying signature, can also be:
Steps A: downloader judges that whether new file is the file of PE structure, if so, then carries out certification authentication to new file, performs step B, otherwise downloads corresponding signature file, performs step C;
Step B: downloader carries out certification authentication to new file, if be proved to be successful, then performs step 104, otherwise then authentication failed, terminates;
Step C: downloader is verified described signature file, if be proved to be successful, then performs step 104, otherwise authentication failed, terminate.
14. methods according to claim 1, it is characterized in that, in described step 103, the described new file of described judgement is the need of certifying signature, be specially: described downloader, according to " the need of the certifying signature " of configuration item current in described Download Info, judges that described new file is the need of certifying signature.
15. methods according to claim 1, it is characterized in that, in described step 103, the described signature file downloading correspondence, and sign test operation is carried out to described signature file, be specially: described downloader, according to default PKI, signature algorithm, new file and signature file, uses default signature verification algorithm to verify.
16. methods according to claim 1, is characterized in that,
Described step S13 can also be: described downloader performs corresponding operating according to default executive mode, lastest imformation is write in provisional registration table, as the system reboots, according to the content in described provisional registration table, completes the installation of new file.
CN201310138487.5A 2013-04-19 2013-04-19 A kind of method of automatic renewal Active CN103218242B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310138487.5A CN103218242B (en) 2013-04-19 2013-04-19 A kind of method of automatic renewal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310138487.5A CN103218242B (en) 2013-04-19 2013-04-19 A kind of method of automatic renewal

Publications (2)

Publication Number Publication Date
CN103218242A CN103218242A (en) 2013-07-24
CN103218242B true CN103218242B (en) 2016-04-06

Family

ID=48816069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310138487.5A Active CN103218242B (en) 2013-04-19 2013-04-19 A kind of method of automatic renewal

Country Status (1)

Country Link
CN (1) CN103218242B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077135A (en) * 2014-06-27 2014-10-01 珠海市君天电子科技有限公司 Method and device for processing application programs
CN105138349A (en) * 2015-07-24 2015-12-09 深圳市元征科技股份有限公司 Software upgrading method and device
CN105224371B (en) * 2015-10-21 2018-10-12 浪潮(北京)电子信息产业有限公司 A kind of update method and system of storage management software
CN107193576A (en) * 2016-03-15 2017-09-22 阿里巴巴集团控股有限公司 The update method and device of a kind of application program for mobile terminal
CN106599085A (en) * 2016-11-25 2017-04-26 努比亚技术有限公司 Automatic refreshing method and device for web system configuration file
CN106888247B (en) * 2016-12-26 2021-01-05 沈阳通用软件有限公司 Method for unified terminal IE configuration and protection
CN106934278A (en) * 2017-03-20 2017-07-07 福建超汇信息技术有限公司 Software installation method and its system based on barcode scanning equipment
CN107315602B (en) * 2017-05-12 2021-02-12 广东网金控股股份有限公司 Application program upgrading method and terminal
CN108334381A (en) * 2018-01-30 2018-07-27 北京铂阳顶荣光伏科技有限公司 A kind of configuration method and system, filming equipment of filming equipment parameter
CN109828797A (en) * 2019-01-17 2019-05-31 平安科技(深圳)有限公司 Capture service processes management method and relevant device
CN111787019B (en) * 2020-07-02 2023-04-14 深圳市亲邻科技有限公司 Information acquisition method and device based on block chain

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6493871B1 (en) * 1999-09-16 2002-12-10 Microsoft Corporation Method and system for downloading updates for software installation
CN102253850A (en) * 2011-07-08 2011-11-23 烽火通信科技股份有限公司 Incremental software updating method of internet protocol television (IPTV) set top box

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6493871B1 (en) * 1999-09-16 2002-12-10 Microsoft Corporation Method and system for downloading updates for software installation
CN102253850A (en) * 2011-07-08 2011-11-23 烽火通信科技股份有限公司 Incremental software updating method of internet protocol television (IPTV) set top box

Also Published As

Publication number Publication date
CN103218242A (en) 2013-07-24

Similar Documents

Publication Publication Date Title
CN103218242B (en) A kind of method of automatic renewal
CN102364891B (en) Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
CN105487980B (en) The method and device that repairing applications are operating abnormally
EP2456257B1 (en) Method and system for upgrading wireless data card
CN107193612B (en) Version upgrading method and device for mobile terminal
CN105786538B (en) software upgrading method and device based on android system
CN105094913B (en) System, base band firmware and system application upgrade method and device
US9471300B2 (en) Wireless firmware upgrades to an alarm security panel
WO2019062635A1 (en) Update method and device
CN104572221A (en) Vehicle-mounted ECU (electronic control unit) online updating system and method
WO2013078951A1 (en) Method and system for upgrading software
TWI533216B (en) Operating system updating method
CN107301070B (en) Upgrading method and terminal
CN105743933B (en) A kind of module updating method and system of router
CN105260209A (en) Hot-update solution of program
CN104918114A (en) Method and device for upgrading operation system
CN108874437B (en) Online cloud updating method for android application program
CN106502713A (en) A kind of method for upgrading software and system
CN105468395A (en) Updating method, device and system
CN104636172A (en) Application upgrading method and device
CN105391763A (en) Method and server for reinforcing a plurality of apk files
CN105183528A (en) Server bios upgrading method and system
CN106210877A (en) The method for upgrading system of intelligent television and device
JP2023505844A (en) Package-based remote firmware update

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant