Driving program signature method and device, electronic equipment and storage medium

By generating drivers that are adapted to the current operating system and extracting target signatures, the problem of high development costs of drivers for early versions of operating systems is solved, and driver development adapted to the early operating system is realized, which reduces development costs and provides richer Driver support.

CN119065711APending Publication Date: 2024-12-03GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310640499.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Driver development costs for early versions of operating systems are high, and the existing technology relies on dedicated hardware and software to complete signatures, making it difficult to adapt to different versions of operating systems.

Method used

By generating a driver that is adapted to the current fast signature, including at least two signatures, one of which is used for early operating systems, extracting the target signature and filling it into the new driver structure, confirming the verification code based on the target signature and program body , generate drivers that are adapted to early operating systems.

Benefits of technology

It reduces the cost of driver development, provides richer driver support, realizes driver development for early versions of operating systems, and simplifies the signature process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065711A_ABST
    Figure CN119065711A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a driver signature method and device, electronic equipment and a storage medium. According to the method, a first drive program is generated in a first signature mode, a program body of a drive and at least two signatures are recorded in the first drive program, and the first drive program is matched with a first operating system; according to the first program structure, extracting at least one target signature from a first signature field of the first driving program; according to a second program structure corresponding to a second driving program, filling a corresponding second signature field with the target signature, filling a corresponding second entity field with the program body, and confirming a second check code according to the target signature and the program body; and according to the second program structure and the second check code, generating a second driving program adaptive to the second operating system. Based on the currently available signature mode, the drive program development of the operating system facing the early version can be quickly realized, and the drive program development cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of software security technology, and in particular to a driver signing method, device, electronic device and storage medium. Background Art

[0002] Drivers running on operating systems usually require corresponding security verification measures to run properly. For example, drivers developed for Windows operating systems usually need to carry a valid digital signature to run on Windows operating systems. The general process of running drivers on Windows operating systems is: when loading a driver, the kernel of the Windows operating system will verify the integrity of the driver's signature. If the signature of the loaded driver does not exist or is incorrect, the kernel will refuse to load the driver, causing the driver to fail to run.

[0003] For Windows systems, new versions are continuously released. The signature mechanisms and signature authentication mechanisms of different versions of operating systems are different on the basis of unified authorization. The signature mechanisms of early versions of operating systems may even have been discontinued. However, different versions of operating systems coexist in large numbers on the market. The signatures of drivers that can run on early versions of operating systems can only be completed by relying on dedicated hardware and software, and the development cost of drivers for early versions of operating systems has increased. Summary of the invention

[0004] The present invention provides a driver signing method, device, electronic device and storage medium to solve the technical problem in the prior art that drivers for early versions of operating systems can only rely on dedicated hardware and software, resulting in increased development costs.

[0005] In a first aspect, an embodiment of the present invention provides a driver signing method, comprising:

[0006] Generate a first driver program by a first signature method, wherein a first program structure corresponding to the first driver program includes a first entity field and a first signature field, wherein the first entity field records a program body of the driver, and the first signature field records at least two signatures, and the first driver program is adapted to a first operating system;

[0007] extracting at least one target signature from a first signature field of a first driver program according to a first program structure;

[0008] According to the second program structure corresponding to the second driver, fill the target signature into the corresponding second signature field, fill the program body into the corresponding second entity field, and confirm the second verification code according to the target signature and the program body;

[0009] According to the second program structure, the second verification code is filled into the corresponding second verification field to generate a second driver program, the second driver program is adapted to the second operating system, and the second operating system has a signature method partially identical to that of the first operating system.

[0010] In a second aspect, an embodiment of the present invention further provides a driver signing device, including:

[0011] A first program generating unit, configured to generate a first driver program by a first signature method, wherein a first program structure corresponding to the first driver program includes a first entity field and a first signature field, wherein the first entity field records a program body of the driver, and the first signature field records at least two signatures, and the first driver program is adapted to a first operating system;

[0012] a target signature extraction unit, configured to extract at least one target signature from a first signature field of a first driver program according to a first program structure;

[0013] A signature filling and verification unit, used to fill the target signature into the corresponding second signature field and the program body into the corresponding second entity field according to the second program structure corresponding to the second driver, and confirm the second verification code according to the target signature and the program body;

[0014] The second program generating unit is used to fill the second verification code into the corresponding second verification field according to the second program structure to generate a second driver program, the second driver program is adapted to the second operating system, and the second operating system has the same signature method as the first operating system.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, including:

[0016] one or more processors;

[0017] a memory for storing one or more computer programs;

[0018] When one or more computer programs are executed by one or more processors, the electronic device implements the driver signing method of the first aspect.

[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the driver signing method of the first aspect.

[0020] In the above-mentioned driver signing method, device, electronic device and storage medium, a first driver is generated by a first signing method, and a first program structure corresponding to the first driver includes a first entity field and a first signature field, the first entity field records the program body of the driver, and the first signature field records at least two signatures, and the first driver is adapted to a first operating system; according to the first program structure, at least one target signature is extracted from the first signature field of the first driver; according to the second program structure corresponding to the second driver, the target signature is filled into the corresponding second signature field, the program body is filled into the corresponding second entity field, and the second verification code is confirmed according to the target signature and the program body; according to the second program structure, the second verification code is filled into the corresponding second verification field to generate a second driver, and the second driver is adapted to a second operating system, and the second operating system has the same signing method as the first operating system. The driver is signed in a manner adapted to the first operating system that can be quickly signed at present, to obtain a first driver, the first driver includes at least two signatures, at least one of the two signatures is a target signature that can be used for an earlier second operating system, and data that can be used for the second operating system is extracted according to the program structure based on the first driver, and the extracted data is re-verified, and a second driver is generated according to the program structure of the second operating system. This is equivalent to quickly realizing driver development for earlier versions of the operating system based on the currently available signing method, thereby reducing the cost of driver development, and thus providing richer driver support for existing devices using earlier versions of the operating system. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A method flow chart of a driver signing method provided by an embodiment of the present invention.

[0022] Figure 2 The figure is a schematic diagram of a driver signing process in an embodiment of the present invention.

[0023] Figure 3 A schematic diagram of the structure of a driver signing device provided by an embodiment of the present invention.

[0024] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0026] It should be noted that the present application specification does not enumerate all optional implementation modes. After reading the present application specification, those skilled in the art should be able to understand that as long as the technical features do not contradict each other, any combination of the technical features can constitute an optional implementation mode.

[0027] When loading a driver, the kernel of the Windows operating system will verify the integrity of the driver's signature. If the signature of the loaded driver does not exist or is incorrect, the kernel will refuse to load the driver, causing the driver to fail to run. Drivers for earlier versions of operating systems (such as Windows 7) could have been signed using a cross-certificate or HCK (Hardware Certification Kit).

[0028] A cross-certificate is issued by the developer of the operating system to the certificate authority, which then issues a certificate to the software development organization. The software development organization signs the driver locally based on the issued certificate and attaches the cross-certificate. The driver signed in this way can pass the signature verification on earlier versions of the operating system.

[0029] To sign with HCK, you need a Windows Server 2012 as a test and signing server; install a test controller and a test workstation on the server, deploy an available EV (Extended Validation) certificate signing environment on the server, and prepare one or more electronic devices with an earlier version of the operating system as test machines, and install the test client on the test machine. When signing, install the driver on the test machine and run it, select the test machine and the driver to be tested on the test workstation for testing, generate the driver's .cat file, and sign the .cat file with your own EV certificate, add the .inf, .cat, and .sys files to the driver file of the test project, export the .hckx file from the test workstation and specify the EV certificate signature at the same time, upload the signed .hckx file to the developer of the operating system, and wait for the online signing process to pass before downloading the signed driver package.

[0030] Regarding the cross-certificate method, the developers of the operating system no longer issue new cross-certificates. Newly issued certificates no longer support the cross-validation method, and old certificates will expire. After all old certificates expire, it will be completely impossible to sign the driver using a cross-certificate method.

[0031] The operating environment of HCK is complex and old. To ensure the purity of the operating environment, dedicated test hardware and software need to be configured, which increases the cost of hardware and software. Moreover, the signing method using HCK relies on the click operation of the developer on the human-computer interaction interface, which is difficult to automate and deploy on a large scale, and the labor cost and scale cost are also relatively high.

[0032] In response to the above technical problems, this solution proposes a driver signing method, in which a first driver is obtained by signing the driver in a manner adapted to the first operating system that can be quickly signed. The first driver includes at least two signatures, and at least one of the two signatures is a target signature that can be used for an early second operating system. Based on the first driver, data that can be used for the second operating system is extracted according to the program structure, and the extracted data is re-verified to generate a second driver according to the program structure of the second operating system. This is equivalent to quickly realizing driver development for early versions of operating systems based on the currently available signing method, thereby reducing driver development costs, and providing richer driver support for existing devices that use early versions of operating systems.

[0033] The following is a detailed description of the various embodiments of the present invention.

[0034] Figure 1 This is a method flow chart of a driver signing method provided by an embodiment of the present invention, and the driver signing method is implemented by an electronic device. Figure 1 The driver signing method includes steps S110 to S140:

[0035] Step S110: Generate a first driver program by a first signature method. The first program structure corresponding to the first driver program includes a first entity field and a first signature field. The first entity field records the program body of the driver. The first signature field records at least two signatures. The first driver program is adapted to the first operating system.

[0036] In the embodiment of the present application, what is ultimately to be achieved is to reduce the signing cost of the driver developed for the second operating system, that is, the earlier operating system (such as Windows 7 system). The basis for achieving this signature is the first operating system. The first operating system refers to the operating system (such as Windows 10 system) that can currently complete the signing of the corresponding version of the driver in a simple and low-cost manner, and the signature of the first operating system includes the signature required by the second operating system. The signature method corresponding to the first operating system is the first signature method, and the driver generated by the first signature method is the first driver, and the first driver is correspondingly adapted to the first operating system. The first driver is adapted to the first operating system means that the first driver runs in the first operating system and can at least pass the integrity verification of the first operating system.

[0037] The first program structure corresponding to the first driver refers to the encoding structure of the data corresponding to the first driver. The first driver generally includes at least a program body and a signature for realizing the driver function. In the embodiment of the present application, the corresponding parts in the encoding structure are defined as the first entity field and the first signature field, that is, the first entity field records the program body of the driver, and the first signature field records at least two signatures. Whether the program body recorded in the first entity field can be applied to the first operating system depends on the specific development content. If the compatibility with the first operating system is taken into consideration during development, the first driver can be run on the first operating system; if it is only for the second operating system, the first driver is only the second driver in the end, and it may not be able to run on the first operating system.

[0038] The first signing method, for example, corresponds to the attestation signing method of the Windows 10 system. In this signing method, the software development organization corresponding to the driver obtains an EV-level code signing certificate from the certificate authority. The code signing certificate is the first signing certificate obtained in advance before starting the signing. The first signing certificate obtained in advance is uploaded to the online signing system. The online signing system is adapted to the first operating system for online signing. The online signing system is usually provided by the developer of the operating system. After the driver development is completed and the original driver is obtained, the software development organization corresponding to the driver signs the original driver locally for the first time using the first signing certificate to obtain a temporary driver with the first signature recorded in the first signature field; then the temporary driver is sent to the online signing system so that the online signing system signs the temporary driver online to obtain the first driver with the second signature and the first signature recorded in the first signature field; and finally the first driver is obtained from the online signing system.

[0039] If the original driver is developed for both the first operating system and the second operating system, the generated first driver can only run on the first operating system, because if the first driver runs on the second operating system, the signature added by the first signature method can only read the signature information in the established method of the second operating system when the kernel of the second operating system loads the driver, but the location where the second operating system reads the signature information from the first driver is not the location where the signature information can be verified by the second operating system signature integrity, and accordingly, the signature integrity verification cannot be passed, and the first driver cannot run on the second operating system. For example, the first driver generated by the certification signature method cannot be verified and run in the Windows 7 system. Because the two signatures generated by the certification signature in the first driver are signed using an EV-level code signing certificate and an official certificate of the operating system developer, respectively, and when the Windows 7 system loads the first driver, it can only recognize the signature added using the EV-level code signing certificate according to its own integrity verification method, and this signature cannot be verified as a valid signature by the Windows 7 system. Therefore, although the first driver records a signature that can be verified as valid by the Windows 7 system, the Windows 7 system cannot accurately recognize this signature as valid.

[0040] Step S120: extracting at least one target signature from the first signature field of the first driver program according to the first program structure.

[0041] In this solution, after obtaining the first driver, at least one target signature that can be verified as valid by the second operating system is extracted according to the corresponding first program structure. It should be understood that the target signature here includes all signatures required for the second operating system to complete verification.

[0042] Step S130: according to the second program structure corresponding to the second driver, fill the target signature into the corresponding second signature field, fill the program body into the corresponding second entity field, and confirm the second verification code according to the target signature and the program body.

[0043] When generating drivers with required signatures for specific corresponding different operating systems, the contents required by the corresponding drivers are highly correlated. For example, the program bodies are substantially the same, and the target signatures required by the second operating system are all recorded in the first driver corresponding to the first operating system. Based on the correlation of the above data, the embodiment of the present application extracts relevant data from the first driver and generates the second driver according to the second data structure corresponding to the second operating system. For example, the extracted target signature is filled into the corresponding second signature field according to the second program structure corresponding to the second driver, and the program body is filled into the corresponding second entity field, and then the corresponding second verification code is confirmed according to the filled target signature and program body.

[0044] An optional data processing method is that the first driver and the second driver have substantially the same program structure, that is, the first program structure corresponding to the first driver also includes a first check field, and the number of target signatures is less than the number of signatures recorded in the first signature field; accordingly, the processing process based on the second program structure in step S130 can be completed directly on the basis of the first program structure. First, the data recorded in the first signature field and the first check field in the first driver are cleared, and the data recorded in the first entity field is retained to obtain the initial second driver, which is equivalent to removing part of the content in the first driver, that is, obtaining the initial state of the second driver; then, according to the second program structure corresponding to the second driver, the target signature is filled into the corresponding second signature field in the initial second driver, and the blank field corresponding to the first signature field in the initial second driver is filled; finally, the second check code is confirmed according to the data in the second signature field and the second entity field. Through this fast processing method, the processing efficiency of the second driver can be improved.

[0045] Based on the same first program structure and second program structure, the implementation process of generating the second driver program can refer to Figure 2 .like Figure 2 As shown, the first driver 10 includes a first checksum field 110 (recording a first checksum code), a first signature field 120, and a first entity field 130 (recording other contents mainly including the program body), wherein the first signature field 120 corresponds to a first signature 121 (for example, a signature completed using an EV-level code signing certificate based on a proof signature), a second signature 122 (a signature completed using the official certificate of the operating system developer), and a first fill area 123 (used to complete the standard program structure). If the second operating system directly loads the first driver 10 for verification according to its own signature method, the first signature 121 will be read from the location of the first signature 121, but the first signature 121 is not a signature that the second operating system can verify as valid, and the second operating system will accordingly fail to complete the loading of the first driver 10.

[0046] Continue to refer Figure 2 Based on the embodiment of the present application, the target signature (i.e., the second signature 122) can be extracted from the first signature field 120 of the first driver 10, and then the data recorded in the first signature field 120 and the first check field 110 in the first driver 10 are cleared, and the other contents recorded in the first entity field 130 are retained to obtain the initial second driver. Compared with the final second driver 20, the initial second driver still lacks the second check code and signature. At this time, the target signature is added to the corresponding position in the second signature field 220 according to the second program structure, and the second signature 222 is recorded in the second signature field 220 and a blank field is generated. The data is filled in the default data processing method, for example, the corresponding number of 0s, 1s, or random binary numbers are added to obtain a second filling area 223 different from the first filling area 123. Finally, the second check code is obtained according to the filled second signature field 220 and the second entity field 230, and the second check code is subsequently added to the second check field 120. In the embodiment of the present application, the state between clearing the first signature field 120 and the first check field 110 of the first driver 10 and adding the second check code to generate the second driver 20 is called the initial second driver, which is only for indicating that the final usable second driver has not yet been generated.

[0047] Step S140: according to the second program structure, fill the second verification code into the corresponding second verification field to generate a second driver program, the second driver program is adapted to the second operating system, and the second operating system has a signature method partially the same as the first operating system.

[0048] When the corresponding verification code, signature and program body (second verification code, target signature and the same program body as in the first entity field) have been confirmed, the second program structure is added to the corresponding fields to obtain the second driver. For example, based on the substantially identical first program structure and second program structure, after the target signature and program body are added to the corresponding fields, the second verification code is filled into the corresponding second verification field in the initial second driver according to the second program structure to generate the second driver. The specific second driver, the relationship between the signature method of the second operating system and the first operating system has been described in the previous text and will not be repeated here.

[0049] When the second driver program thus generated is loaded into the second operating system for operation, the kernel of the second operating system, according to the second program structure, reads the second verification code from the second verification field to complete the verification, and then reads the signature from the second signature field, and accordingly obtains its own available target signature, thereby verifying that the signature of the second driver program is valid, and the second driver program can operate normally. Through the embodiment of the present application, a driver program that can be verified as a valid signature by the second operating system can be obtained on the basis of the signature method that cannot support the second operating system to verify the validity, and the signature process can be implemented through the general existing signature method, which effectively reduces the software and hardware costs and labor costs of developing drivers for earlier versions of operating systems.

[0050] In the above method, a first driver is generated by a first signature method, a first program structure corresponding to the first driver includes a first entity field and a first signature field, the first entity field records the program body of the driver, and the first signature field records at least two signatures, and the first driver is adapted to a first operating system; according to the first program structure, at least one target signature is extracted from the first signature field of the first driver; according to a second program structure corresponding to the second driver, the target signature is filled into the corresponding second signature field, the program body is filled into the corresponding second entity field, and the second verification code is confirmed according to the target signature and the program body; according to the second program structure, the second verification code is filled into the corresponding second verification field to generate a second driver, the second driver is adapted to a second operating system, and the second operating system has the same signature method as the first operating system. The driver is signed in a manner adapted to the first operating system that can be quickly signed at present, to obtain a first driver, the first driver includes at least two signatures, at least one of the two signatures is a target signature that can be used for an earlier second operating system, and based on the first driver, data that can be used for the second operating system is extracted according to the program structure, and the extracted data is re-verified, and a second driver is generated according to the program structure of the second operating system. This is equivalent to quickly realizing driver development for earlier versions of the operating system based on the currently available signing method, thereby reducing the cost of driver development, and providing richer driver support for existing devices using earlier versions of the operating system.

[0051] Figure 3 A schematic diagram of the structure of a driver signature device provided by an embodiment of the present invention. Figure 3 The driver signature device includes a first program generation unit 310, a target signature extraction unit 320, a signature filling verification unit 330 and a second program generation unit 340.

[0052] Among them, the first program generation unit 310 is used to generate a first driver program through a first signature method. The first program structure corresponding to the first driver program includes a first entity field and a first signature field. The first entity field records the program body of the driver, and the first signature field records at least two signatures. The first driver program is adapted to the first operating system; the target signature extraction unit 320 is used to extract at least one target signature from the first signature field of the first driver program according to the first program structure; the signature filling and verification unit 330 is used to fill the target signature into the corresponding second signature field according to the second program structure corresponding to the second driver program, fill the program body into the corresponding second entity field, and confirm the second verification code according to the target signature and the program body; the second program generation unit 340 is used to fill the second verification code into the corresponding second verification field according to the second program structure to generate a second driver program. The second driver program is adapted to the second operating system, and the signature method of the second operating system is partially the same as that of the first operating system.

[0053] Based on the above embodiment, the first program generating unit 310 includes:

[0054] A certificate uploading module, used to upload the pre-obtained first signature certificate to an online signature system, the online signature system being adapted to the first operating system for online signing;

[0055] A first signature module, used to locally sign the original driver for the first time using a first signature certificate, and obtain a temporary driver having the first signature recorded in a first signature field;

[0056] A sending signature module, used for sending the temporary driver to the online signature system, so that the online signature system performs online signing on the temporary driver, and obtains a first driver in which the second signature and the first signature are recorded in the first signature field;

[0057] The program acquisition module is used to acquire the first driver from the online signature system.

[0058] Based on the above embodiment, the first program structure corresponding to the first driver program further includes a first verification field, and the number of target signatures is less than the number of signatures recorded in the first signature field;

[0059] Accordingly, the signature padding verification unit 330 includes:

[0060] A data clearing module, used to clear the data recorded in the first signature field and the first check field in the first driver, retain the data recorded in the first entity field, and obtain an initial second driver;

[0061] A first filling module fills the target signature into the corresponding second signature field in the initial second driver according to the second program structure corresponding to the second driver, and fills the blank field corresponding to the first signature field in the initial second driver;

[0062] A verification code confirmation module, used to confirm the second verification code according to the data in the second signature field and the second entity field;

[0063] Accordingly, the second program generating unit 340 includes:

[0064] The verification code filling module is used to fill the second verification code into the corresponding second verification field in the initial second driving program according to the second program structure to generate the second driving program.

[0065] Based on the above embodiment, the first operating system is Windows 10 system and the second operating system is Windows 7 system.

[0066] The driver signing device provided in the embodiment of the present invention is included in an electronic device and can be used to execute any driver signing method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0067] It is worth noting that in the embodiment of the above-mentioned driver signature device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0068] Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, the electronic device includes a processor 410 and a memory 420, and may also include an input device 430, an output device 440, and a communication device 450; the number of processors 410 in the electronic device may be one or more, Figure 4 A processor 410 is taken as an example; the processor 410, the memory 420, the input device 430, the output device 440 and the communication device 450 in the electronic device can be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0069] The memory 420 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the driver signing method in the embodiment of the present invention. The processor 410 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 420, that is, implements the above-mentioned driver signing method.

[0070] The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 420 may further include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0071] The input device 430 can be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 440 can include a display device such as a display screen for displaying power, working mode, and the progress of generating the second driver.

[0072] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to perform relevant operations in the driver signing method provided in any embodiment of the present application, and has corresponding functions and beneficial effects.

[0073] Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products.

[0074] Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0075] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0076] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0077] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0078] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A driver signing method, characterized in that: include: Generate a first driver program by a first signature method, wherein a first program structure corresponding to the first driver program includes a first entity field and a first signature field, wherein the first entity field records a program body of the driver, and the first signature field records at least two signatures, and the first driver program is adapted to a first operating system; extracting at least one target signature from a first signature field of the first driver according to the first program structure; According to the second program structure corresponding to the second driver, fill the target signature into the corresponding second signature field, fill the program body into the corresponding second entity field, and confirm the second verification code according to the target signature and the program body; According to the second program structure, the second verification code is filled into the corresponding second verification field to generate the second driver, the second driver is adapted to the second operating system, and the signature method of the second operating system is partially the same as that of the first operating system.

2. The driver signing method according to claim 1, characterized in that: The step of generating a first driver program by using a first signature method includes: Uploading the pre-obtained first signing certificate to an online signing system, wherein the online signing system is adapted to the first operating system for online signing; The original driver is signed locally for the first time using the first signature certificate to obtain a temporary driver having the first signature recorded in the first signature field; Sending the temporary driver to an online signature system so that the online signature system performs online signing on the temporary driver to obtain a first driver having a second signature and the first signature recorded in the first signature field; The first driver is obtained from the online signing system.

3. The driver signing method according to claim 1 or 2, characterized in that: The first program structure corresponding to the first driver program further includes a first verification field, and the number of the target signatures is less than the number of signatures recorded in the first signature field; Correspondingly, the method of filling the target signature into the corresponding second signature field, filling the program body into the corresponding second entity field according to the second program structure corresponding to the second driver, and confirming the second verification code according to the target signature and the program body includes: Clear the data recorded in the first signature field and the first check field in the first driver, retain the data recorded in the first entity field, and obtain an initial second driver; According to the second program structure corresponding to the second driver, the target signature is filled into the corresponding second signature field in the initial second driver, and the blank field corresponding to the first signature field in the initial second driver is filled; confirming a second verification code according to the data in the second signature field and the second entity field; Correspondingly, the second verification code is filled into the corresponding second verification field according to the second program structure to generate the second driver program, including: According to the second program structure, the second verification code is filled into the corresponding second verification field in the initial second driving program to generate the second driving program.

4. The driver signing method according to claim 3, characterized in that: The first operating system is Windows 10 system, and the second operating system is Windows 7 system.

5. A driver signature device, characterized in that: include: a first program generating unit, configured to generate a first driver program by a first signature method, wherein a first program structure corresponding to the first driver program includes a first entity field and a first signature field, wherein the first entity field records a program body of the driver, and the first signature field records at least two signatures, and the first driver program is adapted to a first operating system; a target signature extraction unit, configured to extract at least one target signature from a first signature field of the first driver program according to the first program structure; A signature filling and verification unit, used to fill the target signature into the corresponding second signature field, fill the program body into the corresponding second entity field according to the second program structure corresponding to the second driver, and confirm a second verification code according to the target signature and the program body; The second program generating unit is used to fill the second verification code into the corresponding second verification field according to the second program structure to generate the second driver program, wherein the second driver program is adapted to a second operating system, and the second operating system has a signature method partially the same as that of the first operating system.

6. The driver signing device according to claim 5, characterized in that: The first program generating unit comprises: A certificate uploading module, used to upload the pre-obtained first signing certificate to an online signing system, wherein the online signing system is adapted to the first operating system for online signing; A first signature module, used to locally sign the original driver for the first time using the first signature certificate, and obtain a temporary driver with the first signature recorded in the first signature field; A sending signature module, used for sending the temporary driver to an online signature system, so that the online signature system performs online signing on the temporary driver to obtain a first driver having a second signature and the first signature recorded in the first signature field; A program acquisition module is used to acquire the first driver program from the online signature system.

7. The driver signing device according to claim 5 or 6, characterized in that: The first program structure corresponding to the first driver program further includes a first verification field, and the number of the target signatures is less than the number of signatures recorded in the first signature field; Correspondingly, the signature padding verification unit includes: A data clearing module, used for clearing the data recorded in the first signature field and the first check field in the first driver, retaining the data recorded in the first entity field, and obtaining an initial second driver; A first filling module, according to a second program structure corresponding to the second driver, fills the target signature into a corresponding second signature field in the initial second driver, and completes a blank field in the initial second driver corresponding to the first signature field; A verification code confirmation module, used to confirm a second verification code according to data in the second signature field and the second entity field; Accordingly, the second program generating unit includes: The verification code filling module is used to fill the second verification code into the corresponding second verification field in the initial second driving program according to the second program structure to generate the second driving program.

8. The driver signing device according to claim 7, characterized in that: The first operating system is Windows 10 system, and the second operating system is Windows 7 system.

9. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more computer programs; When the one or more computer programs are executed by the one or more processors, the electronic device implements the driver signing method as described in any one of claims 1-4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the driver signing method as described in any one of claims 1 to 4 is implemented.