A digital certificate verification method and device
By receiving transaction instructions from the server and using identification information for rapid verification of digital certificates, the problem of long waiting time for multiple certificate resolutions in the security key is solved, and rapid verification and efficient authorization of digital certificates are achieved.
Patent Information
- Application Number
- CN202010799560.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-11
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-08-11
AI Technical Summary
When there are multiple digital certificates in the security key, the waiting time to traverse and parse all digital certificates is long, affecting the efficiency of the authorization process.
By receiving the transaction instructions sent by the server, the identification information (such as the DN and CN of the digital certificate) is used to obtain the certificate information and certificate identification from the security key, verify the verification information, and perform transaction authentication when the verification is passed to achieve rapid verification. .
The fast verification process of digital certificates is improved, the waiting time in the authorization process is reduced, and the efficiency is improved.
Smart Images

Figure CN114079571B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information security technology, and in particular, relates to a digital certificate verification method and device. Background Art
[0002] The security key contains a digital certificate representing the user's identity. Every time a user uses a digital certificate for authorization, the certificate driver installed on the terminal device needs to perform an irreversible one-way analysis of the digital certificate to be authorized to ensure that the content in the digital certificate cannot be copied.
[0003] When a digital certificate in a security key is used for authorization, the certificate driver needs to parse all digital certificates stored in the security key for identity authentication, and then match the specified digital certificate obtained after parsing. When there are multiple digital certificates stored in the security key, the waiting time for traversing and parsing all digital certificates is long. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a digital certificate verification method and device to solve the problem of long waiting time for traversing and parsing all digital certificates when there are multiple digital certificates stored in a security key.
[0005] A first aspect of an embodiment of the present application provides a digital certificate verification method, including:
[0006] Receiving a transaction instruction sent by a server; wherein the transaction instruction carries identification information, and the identification information includes at least one of a DN and a CN of a digital certificate;
[0007] When a certificate record corresponding to the security key has been stored, obtaining certificate information and a certificate identifier corresponding to the identification information from the certificate record;
[0008] According to the certificate identifier, obtaining verification information corresponding to the digital certificate from the security key;
[0009] Verifying the verification information;
[0010] When the verification information is verified, transaction authentication is performed based on the digital certificate.
[0011] A second aspect of an embodiment of the present application provides a digital certificate verification device, including:
[0012] A transceiver module, used for receiving a transaction instruction sent by a server; wherein the transaction instruction carries identification information, and the identification information includes at least one of a DN and a CN of a digital certificate;
[0013] A search module, configured to obtain, when a certificate record corresponding to the security key has been stored, certificate information and a certificate identifier corresponding to the identification information from the certificate record;
[0014] The search module is further used to obtain verification information corresponding to the digital certificate from the security key according to the certificate identifier;
[0015] A verification module, used to verify the verification information;
[0016] The verification module is also used to perform transaction authentication according to the digital certificate when the verification information is verified.
[0017] The third aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the digital certificate verification method provided in the first aspect of the embodiment of the present application when executing the computer program.
[0018] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the digital certificate verification method provided in the first aspect of the embodiment of the present application are implemented.
[0019] The first aspect of an embodiment of the present application provides a digital certificate verification method, which obtains the certificate information and certificate identifier corresponding to the identification information in the stored certificate record according to the identification information in the transaction instruction, verifies the certificate information with the verification information obtained from the security key, and uses the corresponding digital certificate to conduct transactions after the verification is passed, thereby realizing rapid verification of the digital certificate during the authorization process.
[0020] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 This is a first flow chart of the digital certificate verification method provided in the embodiment of the present application;
[0023] Figure 2This is a second flow chart of the digital certificate verification method provided in the embodiment of the present application;
[0024] Figure 3 This is a third flow chart of the digital certificate verification method provided in the embodiment of the present application;
[0025] Figure 4 This is a fourth flow chart of the digital certificate verification method provided in the embodiment of the present application;
[0026] Figure 5 This is a fifth flow chart of the digital certificate verification method provided in the embodiment of the present application;
[0027] Figure 6 This is a sixth flow chart of the digital certificate verification method provided in the embodiment of the present application;
[0028] Figure 7 This is a seventh flow chart of the digital certificate verification method provided in the embodiment of the present application;
[0029] Figure 8 It is a structural diagram of a digital certificate verification device provided in an embodiment of the present application;
[0030] Fig. 9 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0032] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0033] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0034] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0035] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0036] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0037] The embodiment of the present application provides a digital certificate verification method, which can be applied to a terminal device with data processing and control functions that can be connected to a security key device such as a USB shield or a FIDO security key by wired or wireless communication, and can be specifically executed by a processor of the terminal device when running a computer program with corresponding functions. The terminal device can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.
[0038] like Figure 1 As shown, the digital certificate verification method provided in the embodiment of the present application includes the following steps S101 to S105:
[0039] Step S101, receiving a transaction instruction sent by a server; wherein the transaction instruction carries identification information, and the identification information includes at least one of the DN and CN of a digital certificate.
[0040] In the application, the terminal device receives the transaction instruction sent by the server. The server has the function of issuing digital certificates. The server can be a server of a certificate authority (CA), a bank, or other institutions with the authority to issue digital certificates. The transaction instruction includes transaction data and identification information. The transaction data is the data part of the transaction instruction. The identification information can be used as the prefix or suffix of the transaction instruction. The identification information includes at least one of the DN (Distinguished Name) and CN (Common Name) of the digital certificate required for this transaction. The DN of a digital certificate refers to the unique identifier of the certificate holder. The DN contains the certificate holder's common name CN, organizational unit OU (Organizational Unit), organization O (Organizational), country C (Country) and other information.
[0041] Step S102: When a certificate record corresponding to the security key has been stored, obtain certificate information and a certificate identifier corresponding to the identification information from the certificate record.
[0042] In the application, after the terminal device receives the transaction instruction sent by the server, it searches the local memory for the certificate record of the security key currently connected to the terminal device. When the local memory is found to store the certificate record of the security key currently connected to the terminal device, the certificate information containing the same DN or CN as the identification information is searched from the certificate record according to the identification information and the certificate identifier is obtained. The certificate information and certificate identifier found according to the identification information are read into the memory of the terminal device for temporary storage. The certificate identifier is the unique number of the digital certificate. When the terminal device has stored the certificate record corresponding to the security key, the certificate record can be permanently stored or temporarily stored (i.e. cached) in the register within a set period.
[0043] like Figure 2 As shown, in one embodiment, based on Figure 1 In the corresponding embodiment, after step S101, the following steps are further included:
[0044] Step S201: When a certificate record corresponding to a security key is not stored, the certificate record is obtained from the security key and stored.
[0045] In the application, when the local memory is not found to store the certificate record of the security key currently connected to the terminal device, the terminal device accesses the security key to obtain the certificate record of the security key and stores it in the terminal device memory.
[0046] In one embodiment, the certificate information includes a public key of the digital certificate;
[0047] Alternatively, the certificate information includes at least one of the DN, CN, a hash value of the DN, and a hash value of the CN of the digital certificate.
[0048] In the application, the certificate information includes the public key of the digital certificate, and may also include the DN, CN, and the last 64 bytes of data of the digital certificate; or, the certificate information includes at least one of the DN, CN, a hash value of the DN, and a hash value of the CN of the digital certificate, wherein the hash value of the DN is encrypted by the server using a private key and sent to the terminal device, and the hash value of the CN is also encrypted by the server using a private key and sent to the terminal device.
[0049] Step S103: Acquire verification information corresponding to the digital certificate from the security key according to the certificate identifier.
[0050] In the application, the terminal device searches for a digital certificate with the same certificate identifier in the security key according to the certificate identifier temporarily stored in its memory, and then obtains verification information from the found digital certificate. The verification information includes the same type of information as the certificate information, that is, the verification information also includes the public key of the digital certificate, and may also include the DN, CN, and the last 64 bytes of data of the digital certificate; or, the verification information also includes at least one of the DN, CN, the hash value of the DN, and the hash value of the CN of the digital certificate, wherein the hash value of the DN is encrypted by the server using the private key and sent to the terminal device, and the hash value of the CN is also encrypted by the server using the private key and sent to the terminal device.
[0051] Step S104: verify the verification information.
[0052] In the application, the verification information can be verified by comparing the content of the verification information with the content of the stored certificate information. If the content in the verification information is consistent with the content in the certificate information, the verification passes, otherwise, the verification fails.
[0053] Step S105: When the verification information is verified, transaction authentication is performed according to the digital certificate.
[0054] In the application, when the verification information is verified, the digital certificate corresponding to the certificate identifier of the transaction instruction in the security key can be used to authenticate the transaction. After the transaction authentication is completed, the transaction authentication information and the transaction instruction are packaged and fed back to the server. The transaction authentication can specifically be an online digital signature.
[0055] In one embodiment, the server includes a certificate server and a transaction server. Specifically, the certificate server is used to store digital certificates, and is also used to download the digital certificate required for the security key and the certificate information and certificate identifier of the digital certificate from the certificate server and write them into the security key when the terminal device initiates a digital certificate download request to the certificate server; the transaction server is used to send the transaction instruction and receive the transaction authentication information and transaction instruction sent by the terminal device after the transaction authentication is completed. The certificate server and the transaction server can be the same server, for example, a CA server or a bank server; or, the certificate server and the transaction server can also be two servers, for example, a CA server and a bank server, two CA servers, or two bank servers.
[0056] like Figure 3 As shown, in one embodiment, based on Figure 1 The corresponding embodiment further includes steps S301 and S302 after step S104:
[0057] Step S301: When the verification of the verification information fails, clear the stored certificate information.
[0058] In the application, when the verification of the verification information fails, it means that the digital certificate in the security key has been updated. At this time, it is necessary to find the certificate information corresponding to the identification information of the transaction instruction in the memory and delete it.
[0059] Step S302: Obtain the certificate record from the security key and store it.
[0060] In the application, after deleting the certificate information corresponding to the identification information of the transaction instruction, the terminal device accesses the security key to obtain the certificate record corresponding to the identification information of the transaction instruction in the security key and stores it in the terminal device memory. The certificate record can be stored permanently or temporarily stored (i.e., cached) in a register within a set period. After executing step S360, the process can return to step S120 and execute subsequent steps.
[0061] like Figure 4 As shown, in one embodiment, based on Figure 1 In the corresponding embodiment, before step S101, the following steps are further included:
[0062] Step S401: Download the digital certificate, certificate information and certificate identifier from the server and write the security key.
[0063] In the application, when the security key establishes a connection with the terminal device, if it is necessary to download the digital certificate and write the security key, the terminal device can initiate a digital certificate download request to the server to download the digital certificate required for the security key and the certificate information and certificate identifier of the digital certificate from the server and write them into the security key.
[0064] like Figure 5 As shown, in one embodiment, based on Figure 4 In the corresponding embodiment, step S401 includes the following steps S501 and S502:
[0065] Step S501: Create a certificate information list in the security key.
[0066] In the application, when the security key establishes a connection with the terminal device, the terminal device accesses the security key and searches whether a certificate information list has been created in the security key. If the certificate information list has not been created, a certificate information list is created in the security key to store the certificate information written into the security key.
[0067] Step S502: Download the digital certificate from the server, write it into the security key, obtain the certificate information and certificate identifier in the digital certificate, and write them into the certificate information list of the security key.
[0068] In the application, when the terminal device downloads a new digital certificate and the certificate information and certificate identifier of the digital certificate from the server, the digital certificate is written into the security key for storage, and at the same time, the public key, the last 64 bytes of data, DN, CN, the hash value of DN and at least one of the hash value of CN in the digital certificate are obtained and written into the certificate information list.
[0069] like Figure 6 As shown, the digital certificate verification method provided in the embodiment of the present application includes the following steps S601 to S610.
[0070] Step S601: Create a certificate information list in the security key;
[0071] Step S602: Download the digital certificate from the server, write it into the security key, obtain the certificate information and certificate identifier in the digital certificate, and write them into the certificate information list of the security key;
[0072] Step S603: receiving a transaction instruction sent by the server; wherein the transaction instruction carries identification information, and the identification information includes at least one of the DN and CN of the digital certificate;
[0073] Step S604: Whether the memory stores a certificate record of a security key for establishing a connection with the terminal device;
[0074] Step S605: When the certificate record corresponding to the security key is not stored, the certificate record is obtained from the security key and stored;
[0075] Step S606: When a certificate record corresponding to the security key has been stored, obtaining a certificate identifier and a first public key corresponding to the identification information from the certificate record;
[0076] Step S607: Acquire a second public key corresponding to the digital certificate from the security key according to the certificate identifier;
[0077] Step S608: Verify whether the first public key is consistent with the second public key;
[0078] Step S609: When the verification fails, clear the stored certificate information and return to step S605;
[0079] Step S610: When the verification is successful, transaction authentication is performed based on the digital certificate.
[0080] In the application, when the security key establishes a connection with the terminal device, the terminal device accesses the security key and checks whether a certificate information list has been created in the security key. If the certificate information list has not been created, a certificate information list is created in the security key to store the certificate information written into the security key. When the terminal device downloads a new digital certificate and the certificate information and certificate identifier of the digital certificate from the server, the digital certificate is written into the security key for storage, and the public key, DN and CN in the digital certificate are obtained and written into the certificate information list.
[0081] After receiving the transaction instruction sent by the server, the terminal device searches the local memory for the certificate record of the security key currently connected to the terminal device. When the local memory does not store the certificate record of the security key currently connected to the terminal device, the terminal device accesses the security key to obtain the certificate record of the security key and stores it in the terminal device memory; when the local memory stores the certificate record of the security key currently connected to the terminal device, the terminal device searches the certificate record for the certificate information containing the same DN or CN as the identification information according to the identification information and obtains the certificate identifier, and reads the certificate identifier and the first public key found according to the identification information into the memory of the terminal device for temporary storage. The terminal device searches the security key for the digital certificate with the same certificate identifier according to the certificate identifier temporarily stored in its memory, and then obtains the second public key from the found digital certificate.
[0082] Verify whether the first public key is consistent with the second public key. If the verification fails, it means that the digital certificate in the security key has been updated. At this time, it is necessary to find the certificate information corresponding to the identification information of the transaction instruction in the memory and delete it. After the deletion is completed, return to step S621; if the verification passes, the digital certificate corresponding to the certificate identification of the transaction instruction in the security key can be used for transaction authentication. After the transaction authentication is completed, the transaction authentication information and the transaction instruction are packaged and fed back to the server. The transaction authentication can specifically be an online digital signature.
[0083] like Figure 7 As shown, the digital verification method provided in the embodiment of the present application includes the following steps: S701 to S710.
[0084] Step S701, creating a certificate information list in the security key;
[0085] Step S702: Download the digital certificate from the server, write it into the security key, obtain the certificate information and certificate identifier in the digital certificate, and write them into the certificate information list of the security key;
[0086] Step S703: receiving a transaction instruction sent by the server; wherein the transaction instruction carries identification information, and the identification information includes at least one of the DN and CN of the digital certificate;
[0087] Step S704: Whether the memory stores a certificate record of a security key for establishing a connection with the terminal device;
[0088] Step S705: When the certificate record corresponding to the security key is not stored, the certificate record is obtained from the security key and stored;
[0089] Step S706: when a certificate record corresponding to the security key has been stored, obtaining certificate information and a certificate identifier corresponding to the identification information from the certificate record;
[0090] Step S707: acquiring verification information corresponding to the digital certificate from the security key according to the certificate identifier;
[0091] Step S708: Verify whether the verification information is consistent with the corresponding identification information;
[0092] Step S709: when the verification of the verification information fails, clear the stored certificate information and return to step S705;
[0093] Step S710: When the verification information is verified, transaction authentication is performed based on the digital certificate.
[0094] In the application, when the security key establishes a connection with the terminal device, the terminal device accesses the security key and searches whether a certificate information list has been created in the security key. If the certificate information list has not been created, a certificate information list is created in the security key to store the certificate information written into the security key. When the terminal device downloads a new digital certificate and the certificate information and certificate identifier of the digital certificate from the server, the digital certificate is written into the security key for storage, and the DN and CN in the digital certificate or the hash value of the DN and the hash value of the CN are obtained and written into the certificate information list.
[0095] After receiving the transaction instruction sent by the server, the terminal device searches the local memory for the certificate record of the security key currently connected to the terminal device. When the local memory does not store the certificate record of the security key currently connected to the terminal device, the terminal device accesses the security key to obtain the certificate record of the security key and stores it in the terminal device memory; when the local memory stores the certificate record of the security key currently connected to the terminal device, the terminal device searches the certificate record for the certificate information containing the same DN or CN as the identification information according to the identification information and obtains the certificate identifier, and reads the certificate information and certificate identifier found according to the identification information into the memory of the terminal device for temporary storage. The terminal device searches the security key for the digital certificate with the same certificate identifier according to the certificate identifier temporarily stored in its memory, and then obtains the verification information from the found digital certificate. The verification information includes the same type of information as the certificate information, that is, the verification information includes the DN and CN of the digital certificate or the hash value of the DN and the hash value of the CN.
[0096] The verification information is verified to see if it is consistent with the corresponding certificate information. If the verification information fails to be verified, it means that the digital certificate in the security key has been updated. At this time, it is necessary to search the memory for the certificate information corresponding to the identification information of the transaction instruction and delete it. After the deletion is completed, return to step S721. If the verification information is verified, the digital certificate corresponding to the certificate identification of the transaction instruction in the security key can be used for transaction authentication. After the transaction authentication is completed, the transaction authentication information and the transaction instruction are packaged and fed back to the server. The transaction authentication can specifically be an online digital signature.
[0097] The digital certificate verification method provided in the embodiment of the present application obtains the certificate information and certificate identifier corresponding to the identification information in the stored certificate record according to the identification information in the transaction instruction, verifies the certificate information with the verification information obtained from the security key, and uses the corresponding digital certificate to conduct transactions after the verification is passed, thereby realizing rapid verification of the digital certificate during the authorization process.
[0098] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0099] like Figure 8 As shown, the embodiment of the present application also provides a digital certificate verification device 8, which is used to execute the steps in the above digital certificate verification embodiment. The digital certificate verification device can be a virtual appliance in the terminal device, which is run by the processor of the terminal device, or it can be the terminal device itself.
[0100] like Figure 8 As shown, the digital certificate verification device 8 provided in the embodiment of the present application includes:
[0101] The transceiver module 801 is used to receive a transaction instruction sent by a server; wherein the transaction instruction carries identification information, and the identification information includes at least one of the DN and CN of the digital certificate;
[0102] A search module 802 is used to obtain certificate information and a certificate identifier corresponding to the identification information from the certificate record when a certificate record corresponding to the security key has been stored; and is also used to obtain verification information corresponding to the digital certificate from the security key according to the certificate identifier;
[0103] The verification module 803 is used to verify the verification information; and is also used to perform transaction authentication according to the digital certificate when the verification information is verified.
[0104] In one embodiment, the digital certificate verification device further includes:
[0105] A record acquisition module, used for acquiring and storing the certificate record from the security key when the certificate record corresponding to the security key is not stored;
[0106] The storage clearing module is used to clear the stored certificate information when the verification of the verification information fails; and is also used to obtain the certificate record from the security key and store it.
[0107] In one embodiment, the digital certificate verification device further includes:
[0108] The writing module is used to download the digital certificate, certificate information and certificate identification from the server and write the security key.
[0109] In application, each module in the digital certificate verification device may be a software program module, or may be implemented by different logic circuits integrated in a processor, or may be implemented by multiple distributed processors.
[0110] like Fig. 9 As shown, the embodiment of the present application further provides a terminal device 9 including: at least one processor 91, a memory 92, and a computer program 93 stored in the memory 92 and executable on at least one processor 91, and the processor 91 implements the steps in the above-mentioned various digital certificate verification method embodiments when executing the computer program 93. The terminal device 9 is connected to the server 10 and the security key 11 by wired or wireless communication, and is used to implement the steps in the above-mentioned various digital certificate verification method embodiments when communicating with the server 10 and / or the security key 11.
[0111] In the application, the terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Fig. 9 It is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0112] In applications, the processor may be a central processing unit (CPU), which may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0113] In applications, the memory may be an internal storage unit of a terminal device in some embodiments, such as a hard disk or memory of the terminal device. In other embodiments, the memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device. Further, the memory may also include both an internal storage unit of the terminal device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.
[0114] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0115] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiment can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. In addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0116] An embodiment of the present application also provides a terminal device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in the above-mentioned digital certificate verification method embodiments when executing the computer program.
[0117] The embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned digital certificate verification method embodiment can be implemented.
[0118] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned digital certificate verification method embodiments when executing the computer program product.
[0119] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0121] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0122] In the embodiments provided in the present application, it should be understood that the disclosed terminal device and method can be implemented in other ways. For example, the terminal device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0123] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0124] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A digital certificate verification method, characterized in that: include: Receiving a transaction instruction sent by a server; wherein the transaction instruction carries identification information, and the identification information includes at least one of a DN and a CN of a digital certificate; When a certificate record corresponding to the security key has been stored in the local memory of the terminal device, obtaining certificate information and a certificate identifier corresponding to the identification information from the certificate record; According to the certificate identifier, obtaining verification information corresponding to the digital certificate from the security key; Verifying the verification information; When the verification information is verified, transaction authentication is performed according to the digital certificate; When the verification of the verification information fails, clearing the stored certificate information; After receiving the transaction instruction sent by the server, the method further includes: When the certificate record corresponding to the security key is not stored, the certificate record is obtained from the security key and stored.
2. The digital certificate verification method according to claim 1, characterized in that: When the verification information fails to be verified, after clearing the stored certificate information, the method further includes: The certificate record is obtained from the security key and stored.
3. The digital certificate verification method according to claim 1, characterized in that: Before receiving the transaction instruction sent by the server, the process includes: Download the digital certificate, certificate information, and certificate identifier from the server and write the security key.
4. The digital certificate verification method according to claim 3, characterized in that: The downloading of the digital certificate, certificate information and certificate identification from the server and writing the security key comprises: Create a list of certificate information in the security key; The digital certificate is downloaded from the server and written into the security key, and the certificate information of the digital certificate and the certificate identification are obtained and written into the certificate information list of the security key.
5. The digital certificate verification method according to any one of claims 1 to 4, characterized in that: The certificate information includes the public key of the digital certificate; Alternatively, the certificate information includes at least one of the DN, CN, a hash value of the DN, and a hash value of the CN of the digital certificate; The verification information includes the same type of information as the certificate information.
6. The digital certificate verification method according to any one of claims 1 to 4, characterized in that: Verifying the verification information includes: The verification information is compared with the stored certificate information to see if they are consistent; if they are consistent, it is determined that the verification information has been verified successfully; otherwise, it is determined that the verification information has failed to be verified.
7. A digital certificate verification device, characterized in that: include: A transceiver module, used for receiving a transaction instruction sent by a server; wherein the transaction instruction carries identification information, and the identification information includes at least one of a DN and a CN of a digital certificate; A search module, used to obtain certificate information and certificate identification corresponding to the identification information from the certificate record when the certificate record corresponding to the security key is stored in the local memory of the terminal device; The search module is further used to obtain verification information corresponding to the digital certificate from the security key according to the certificate identifier; A verification module, used to verify the verification information; The verification module is also used to perform transaction authentication according to the digital certificate when the verification information is verified; A record acquisition module, used for acquiring and storing the certificate record from the security key when the certificate record corresponding to the security key is not stored; The storage clearing module is used to clear the stored certificate information when the verification of the verification information fails; and is also used to obtain the certificate record from the security key and store it.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
