Webpage display method, apparatus, device, and medium

By integrating TLS and national standard SSL functional components into H5 applications, the problem of H5 applications not supporting national standard SSL was solved, enabling web page display of the national standard SSL protocol, meeting the Cybersecurity Classified Protection 2.0 standard, and reducing development costs.

CN116383543BActive Publication Date: 2026-02-10CETC CYBERSPACE SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310417598.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-18
Publication Date
2026-02-10
Estimated Expiration
2043-04-18

AI Technical Summary

Technical Problem

H5 applications cannot implement underlying network protocol interfaces and cannot support the national cryptographic SSL protocol, forcing the development model to be abandoned due to excessive costs.

Method used

The TLS and Chinese national cryptographic SSL components are integrated into the web view framework. Network requests are obtained through the web view interface, the protocol type is determined, and the Chinese national cryptographic SSL components are used to initiate network connections. The ECC-SM4-SM3 and ECDHE-SM4-SM3 suites are supported. The Chinese national cryptographic SSL authentication component is constructed and added to the web view framework.

Benefits of technology

It enables webpage display that supports the national cryptographic SSL protocol in H5 applications, meets the requirements of the Cybersecurity Classified Protection 2.0 standard, and reduces development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116383543B_ABST
    Figure CN116383543B_ABST
Patent Text Reader

Abstract

The application discloses a webpage display method and device, equipment and medium, relates to the H5 application development field, and is applied to a target webpage view framework pre-integrated with a TLS function component and a national secret SSL function component. The method comprises the following steps: acquiring a target network request initiated by a client through a webpage view interface, and acquiring a preset protocol type identifier of an interface layer in the webpage view; judging whether the preset protocol type identifier is a preset default identifier; if not, judging whether the preset protocol type identifier is a preset national secret SSL connection identifier; if the preset protocol type identifier is the preset national secret SSL connection identifier, initiating a network connection based on a national secret SSL protocol by calling preset processing of a certificate and private key processing module located in the national secret SSL function component, so as to display a target webpage. Through the above method, the network connection supporting the national secret SSL protocol is realized, and the purpose of displaying the target webpage is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of H5 application development, and particularly relates to a webpage display method and device, equipment and a medium. BACKGROUND

[0002] Grade protection 2.0 clearly stipulates that the message or session process full text in network communication is required to be encrypted in three levels, and one of the main technical standards is the national SSL protocol (Secure Sockets Layer, Secure Sockets Layer). H5 (HTML5) application has the advantages of cross-platform and low development cost, and has become the preferred application development. At present, the H5 application does not have the ability to realize the underlying network protocol interface, and the access to network services can only rely on the Webview (webpage view) component, but the system Webview component of each manufacturer only supports the TLS protocol (Transport Layer Security, Transport Layer Security), and does not support the national SSL protocol. Because the Webview cannot meet the requirements of the national SSL, the H5 development mode can only be abandoned to select other high-cost development mode.

[0003] From the above, it can be seen that how to realize webpage display by using the national SSL protocol is a problem to be solved in the field. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a webpage display method, device, equipment and medium, which can realize webpage display by using the national SSL protocol. The specific scheme is as follows:

[0005] In the first aspect, the present application discloses a webpage display method, which is applied to a target webpage view framework pre-integrated with a TLS function component and a national SSL function component, and includes the following steps:

[0006] A target network request initiated by a client is acquired through a webpage view interface, and a preset protocol type identifier of an interface layer in the webpage view is acquired;

[0007] It is judged whether the preset protocol type identifier is a preset default identifier, and if not, it is judged whether the preset protocol type identifier is a preset national SSL connection identifier;

[0008] If the preset protocol type identifier is the preset SM SSL connection identifier, a network connection based on the SM SSL protocol is initiated by calling preset processing of a certificate and private key processing module in the SM SSL functional component, so as to display the target webpage; wherein the preset processing comprises saving a SM CA certificate, an authentication certificate and an encryption certificate of the client in the webpage view setting, saving a SM authentication private key and a SM encryption private key of the client in the webpage view setting, providing a target interface corresponding to a webpage view network module, and encapsulating a target operation interface of a BoringSSL module in the SM SSL functional component.

[0009] Optionally, after the judging whether the preset protocol type identifier is the preset default identifier, the method further comprises:

[0010] If it is judged that the preset protocol type identifier is the preset default identifier, a network connection based on the SM SSL protocol is initiated by the webpage view network module calling the preset processing of the certificate and private key processing module in the SM SSL functional component.

[0011] Optionally, after the initiating the network connection based on the SM SSL protocol by the webpage view network module calling the preset processing of the certificate and private key processing module in the SM SSL functional component, the method further comprises:

[0012] A connection result of the network connection based on the SM SSL protocol is obtained, and it is judged whether the connection result satisfies a preset success condition;

[0013] If the connection result does not satisfy the preset success condition, a network connection based on a TLS protocol is initiated by the webpage view network module calling a certificate processing module interface in the TLS functional component.

[0014] Optionally, after the judging whether the preset protocol type identifier is the preset SM SSL connection identifier, the method further comprises:

[0015] If the preset protocol type identifier is not the preset SM SSL connection identifier, a network connection based on a TLS protocol is initiated by the webpage view network module calling a certificate processing module interface in the TLS functional component.

[0016] Optionally, the webpage display method further comprises:

[0017] An SM SSL functional component supporting SM SSL authentication is constructed;

[0018] The SM SSL functional component is added to a webpage view component library in the form of a development package in a webpage view framework, so as to obtain the target webpage view framework.

[0019] Optionally, the process of constructing the national cryptographic SSL function component that supports national cryptographic SSL certification further includes:

[0020] Construct a national cryptographic SSL protocol that supports the ECC-SM4-SM3 and ECDHE-SM4-SM3 suites, and add the SM2, SM3 and SM4 algorithms to the preset Crypto module.

[0021] Optionally, the process of initiating a network connection based on the Chinese national cryptographic SSL protocol further includes:

[0022] The certificate and private key processing module sets the national cryptographic certificate, the encryption certificate, the national cryptographic certificate private key, and the encryption private key into the BoringSSL module;

[0023] The CA certificate is used to verify the peer certificate through the certificate operation interface in the BoringSSL module.

[0024] Secondly, this application discloses a webpage display device applied to a target webpage view framework that pre-integrates TLS functional components and national cryptographic SSL functional components, comprising:

[0025] The identifier acquisition module is used to acquire the target network request initiated by the client through the web page view interface, and to acquire the preset protocol type identifier of the interface layer in the web page view;

[0026] The judgment module is used to determine whether the preset protocol type identifier is a preset default identifier; otherwise, it determines whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier.

[0027] The webpage display module is used to initiate a network connection based on the national cryptographic SSL protocol by calling the preset processing of the certificate and private key processing module located in the national cryptographic SSL functional component if the preset protocol type identifier is the preset national cryptographic SSL connection identifier, so as to display the target webpage; wherein, the preset processing includes saving the national cryptographic CA certificate, authentication certificate and encryption certificate of the client set in the webpage view, saving the national cryptographic authentication private key and encryption private key of the client set in the webpage view, providing a target interface corresponding to the webpage view network module, and encapsulating the target operation interface of the BoringSSL module located in the national cryptographic SSL functional component.

[0028] Thirdly, this application discloses an electronic device, including:

[0029] Memory, used to store computer programs;

[0030] A processor is configured to execute the computer program to implement the steps of the aforementioned disclosed webpage display method.

[0031] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed webpage display method.

[0032] As can be seen, this application first obtains the target network request initiated by the client through the webpage view interface, and obtains the preset protocol type identifier in the interface layer of the webpage view; it determines whether the preset protocol type identifier is a preset default identifier, and if not, it determines whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier; if the preset protocol type identifier is the preset national cryptographic SSL connection identifier, it initiates a network connection based on the national cryptographic SSL protocol by calling the preset processing of the certificate and private key processing module in the national cryptographic SSL functional component, so as to display the target webpage; wherein, the preset processing includes saving the national cryptographic CA certificate, authentication certificate and encryption certificate of the client set by the webpage view, saving the national cryptographic authentication private key and encryption private key of the client set by the webpage view, providing a target interface corresponding to the webpage view network module, and encapsulating the target operation interface of the BoringSSL module in the national cryptographic SSL functional component. Therefore, this application obtains the target network request initiated by the client and the preset protocol type identifier. If the preset protocol type identifier is not the preset default identifier, it means that a protocol type has been set. Therefore, it further determines whether the preset protocol type identifier is the preset national cryptographic SSL connection identifier. If so, it uses the national cryptographic SSL function component to initiate a network connection based on the national cryptographic SSL protocol in order to display the target webpage. Therefore, it can meet the national requirements for supporting the national cryptographic SSL protocol in standards such as Cybersecurity Classified Protection 2.0. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0034] Figure 1 This is a flowchart of a webpage display method disclosed in this application;

[0035] Figure 2 This is a schematic diagram illustrating a specific modification of a Webview component library disclosed in this application;

[0036] Figure 3This is a schematic diagram illustrating a specific modification of the BoringSSL library to a national cryptographic SSL standard disclosed in this application.

[0037] Figure 4 This is a schematic diagram of a specific Webview network module modification disclosed in this application;

[0038] Figure 5 This is a flowchart of a specific webpage display method disclosed in this application;

[0039] Figure 6 This is a schematic diagram of the structure of a webpage display device disclosed in this application;

[0040] Figure 7 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0042] Currently, H5 applications lack the ability to implement underlying network protocol interfaces, and accessing network services can only rely on the Webview component. However, the Webview components of various vendors' systems currently only support the TLS protocol and do not support the Chinese national cryptographic SSL protocol. Because Webview cannot meet the requirements of the Chinese national cryptographic SSL, the H5 development model has to be abandoned and other development models with excessively high costs have to be chosen.

[0043] Therefore, this application provides a webpage display solution that can utilize the national cryptographic SSL protocol to display webpages.

[0044] See Figure 1 As shown, this application discloses a webpage display method applied to a target webpage view framework that has pre-integrated TLS and Chinese national cryptographic SSL functional components, including:

[0045] Step S11: Obtain the target network request initiated by the client through the web page view interface, and obtain the preset protocol type identifier of the interface layer in the web page view.

[0046] In this embodiment, it can be understood that before obtaining the target network request initiated by the client through the webpage view interface, a target webpage view framework integrating TLS functional components and Chinese national cryptographic SSL functional components can be created. Creating a target webpage view framework integrating TLS functional components and Chinese national cryptographic SSL functional components involves two main aspects:

[0047] The first aspect involves modifying the WebView component library. The modified WebView component library exists as a development package for integration into target applications, such as... Figure 2 The diagram illustrates a specific modification to a WebView component library. For example, an interface layer, a bridging layer, a WebView adaptation layer, a Content module, and a basic module can be added to a traditional WebView component library. The interface layer provides the target application with calling interfaces, which, while retaining the original WebView interfaces, add interfaces related to setting CA (certificate authority), client certificates, and private keys (as per Chinese cryptographic standards for SSL). The bridging layer is responsible for starting the relevant engine, providing the main view for drawing, and includes the bridging interface layer and the AwContent layer. The WebView adaptation layer is responsible for encapsulating Content for the WebView product form. The Content module implements the core functions of the Chromium kernel. The basic modules include many modules such as the drawing module, the Blink parsing engine module, the network module, and the BoringSSL module, which provide fundamental support for the core functions of Chromium.

[0048] The second aspect involves implementing the transformation of the Chinese national cryptographic SSL network layer, which is divided into the transformation of the BoringSSL library into a Chinese national cryptographic SSL module and the transformation of the Webview network module. The transformation of the BoringSSL library into a Chinese national cryptographic SSL module follows the "GM / T0024-2014 SSL VPN Technical Specification," for example... Figure 3 The diagram illustrates a specific modification of the BoringSSL library to a Chinese cryptographic SSL protocol. While retaining various TLS versions and international algorithms, it adds functionality for both Chinese and commercial cryptographic SSL protocols. The Chinese cryptographic SSL protocol supports ECC-SM4-SM3 and ECDHE-SM4-SM3 suites. The Crypto module adds SM2, SM3, and SM4 algorithms, as well as an EVP interface. The general interfaces include interfaces related to the Chinese cryptographic SSL protocol and SM algorithm, and parameters corresponding to the Chinese cryptographic SSL protocol are added to existing interfaces. The Webview network module modification utilizes... Figure 4As shown, the WebView national cryptographic SSL processing module needs to be modified, and a certificate and private key processing module needs to be added. This module can be used to authenticate and encrypt client certificates and private keys, and verify peer certificates using locally stored authentication modules. The WebView national cryptographic SSL processing module can add national cryptographic SSL processing to the BoringSSL initialization and configuration process, add national cryptographic SSL processing to the handshake process, and call the interface of the certificate and private key processing module to handle commercial cryptographic certificate-related logic when running the national cryptographic SSL protocol. It can also enable switching between TLS and national cryptographic SSL protocols. During the process of initiating a network connection based on the national cryptographic SSL protocol, the WebView network module acts as the maintainer, responsible for the creation and destruction of the preset national cryptographic SSL connection, and calling relevant modules to handle certificate and private key related work. When the WebView component library opens an HTTPS webpage, the WebView national cryptographic SSL processing module will be activated.

[0049] Step S12: Determine whether the preset protocol type identifier is a preset default identifier; otherwise, determine whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier.

[0050] In this embodiment, determining whether the preset protocol type identifier is the preset default identifier is to determine whether the protocol type has been set. If it has not been set, the preset protocol type identifier is the preset default identifier. If the preset protocol type identifier is set, it is not the preset default identifier. It can be understood that if the preset protocol type identifier is not the preset default identifier, it is necessary to further determine whether the protocol type is a Chinese cryptographic SSL connection or a TLS protocol connection. If the preset protocol type identifier is not the preset Chinese cryptographic SSL connection identifier, then a TLS protocol network connection is required.

[0051] Step S13: If the preset protocol type identifier is the preset national cryptographic SSL connection identifier, then by calling the preset processing in the certificate and private key processing module of the national cryptographic SSL functional component, a network connection based on the national cryptographic SSL protocol is initiated to display the target webpage; wherein, the preset processing includes saving the national cryptographic CA certificate, authentication certificate and encryption certificate of the client set in the webpage view, saving the national cryptographic authentication private key and encryption private key of the client set in the webpage view, providing a target interface corresponding to the preset webpage view network module, and encapsulating the target operation interface of the BoringSSL module located in the national cryptographic SSL functional component.

[0052] In this embodiment, the method further includes: constructing a national cryptographic SSL function component that supports national cryptographic SSL certification; and adding the national cryptographic SSL function component to the webpage view component library, which exists in the form of a development package, in the webpage view frame to obtain the target webpage view frame.

[0053] In this embodiment, the process of constructing the national cryptographic SSL functional component that supports national cryptographic SSL certification also includes: constructing a national cryptographic SSL protocol that supports the ECC-SM4-SM3 and ECDHE-SM4-SM3 suites, and adding the SM2 algorithm, SM3 algorithm and SM4 algorithm to the preset Crypto module.

[0054] In this embodiment, the process of initiating a network connection based on the Chinese national cryptographic SSL protocol further includes: setting the Chinese national cryptographic authentication certificate, the encryption certificate, the Chinese national cryptographic authentication private key, and the encryption private key into the BoringSSL module through the certificate and private key processing module; and verifying the peer certificate with the CA certificate through the certificate operation interface in the BoringSSL module.

[0055] As can be seen, this application first obtains the target network request initiated by the client through the webpage view interface, and obtains the preset protocol type identifier in the interface layer of the webpage view; it determines whether the preset protocol type identifier is a preset default identifier, and if not, it determines whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier; if the preset protocol type identifier is the preset national cryptographic SSL connection identifier, it initiates a network connection based on the national cryptographic SSL protocol by calling the preset processing of the certificate and private key processing module in the national cryptographic SSL functional component, so as to display the target webpage; wherein, the preset processing includes saving the national cryptographic CA certificate, authentication certificate and encryption certificate of the client set by the webpage view, saving the national cryptographic authentication private key and encryption private key of the client set by the webpage view, providing a target interface corresponding to the preset webpage view network module, and encapsulating the target operation interface of the BoringSSL module in the national cryptographic SSL functional component. Therefore, this application obtains the target network request initiated by the client and the preset protocol type identifier. If the preset protocol type identifier is not the preset default identifier, it means that a protocol type has been set. Therefore, it further determines whether the preset protocol type identifier is the preset national cryptographic SSL connection identifier. If so, it uses the national cryptographic SSL function component to initiate a network connection based on the national cryptographic SSL protocol in order to display the target webpage. Therefore, it can meet the national requirements for supporting the national cryptographic SSL protocol in standards such as Cybersecurity Classified Protection 2.0.

[0056] See Figure 5 As shown in the figure, this application discloses a specific webpage display method, including:

[0057] Step S21: Obtain the target network request initiated by the client through the web page view interface, and obtain the preset protocol type identifier of the interface layer in the web page view.

[0058] Step S22: Determine whether the preset protocol type identifier is a preset default identifier.

[0059] Step S23: If the preset protocol type identifier is determined to be the preset default identifier, then the preset processing of the certificate and private key processing module located in the national cryptographic SSL function component is invoked through the preset web page view network module to initiate a network connection based on the national cryptographic SSL protocol.

[0060] In this embodiment, after initiating a network connection based on the Chinese cryptographic SSL protocol by calling the preset processing of the certificate and private key processing module located in the Chinese cryptographic SSL functional component through the preset webpage view network module, the method further includes: obtaining the connection result of the network connection based on the Chinese cryptographic SSL protocol, and determining whether the connection result meets the preset success conditions; if the connection result does not meet the preset success conditions, then initiating a network connection based on the TLS protocol by calling the certificate processing module interface in the TLS functional component through the preset webpage view network module. It should be noted that the certificate and private key processing module is a passive participant, not an active initiator, in the process of initiating a network connection based on the TLS protocol.

[0061] Step S24: If it is determined that the preset protocol type identifier is not the preset default identifier, then a network connection is established based on the result of determining whether the preset protocol type identifier is the preset national cryptographic SSL connection identifier, so as to display the target webpage.

[0062] In this embodiment, if the preset protocol type identifier is the preset national cryptographic SSL connection identifier, a network connection based on the national cryptographic SSL protocol is initiated through the national cryptographic SSL function component to display the target webpage; if the preset protocol type identifier is not the preset national cryptographic SSL connection identifier, a network connection based on the TLS protocol is initiated through the TLS function component to display the target webpage. It is understood that the target webpage view framework, which pre-integrates the TLS function component and the national cryptographic SSL function component, is compatible with the system's Webview interface functions and interaction modes.

[0063] Therefore, when the preset protocol type identifier is the preset default identifier, i.e., the protocol type is in the default state, this application selects to initiate a network connection based on the Chinese cryptographic SSL protocol through the Chinese cryptographic SSL function component; if the preset protocol type identifier is not the preset default identifier, it determines whether the preset protocol type identifier is the preset Chinese cryptographic SSL connection identifier. If it is determined to be the preset Chinese cryptographic SSL connection identifier, it initiates a network connection based on the Chinese cryptographic SSL protocol through the Chinese cryptographic SSL function component; if it is determined not to be the preset Chinese cryptographic SSL connection identifier, it initiates a network connection based on the TLS protocol through the TLS function component. Therefore, this application can support both initiating a network connection based on the Chinese cryptographic SSL protocol through the Chinese cryptographic SSL function component and initiating a network connection based on the TLS protocol through the TLS function component, thereby displaying the target webpage.

[0064] See Figure 6 As shown, this application discloses a webpage display device applied to a target webpage view framework that pre-integrates TLS functional components and national cryptographic SSL functional components, including:

[0065] The identifier acquisition module 11 is used to acquire the target network request initiated by the client through the web page view interface, and to acquire the preset protocol type identifier of the client;

[0066] The judgment module 12 is used to determine whether the preset protocol type identifier is a preset default identifier; otherwise, it determines whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier.

[0067] The webpage display module 13 is used to initiate a network connection based on the national cryptographic SSL protocol by calling the preset processing of the certificate and private key processing module located in the national cryptographic SSL functional component if the preset protocol type identifier is the preset national cryptographic SSL connection identifier, so as to display the target webpage; wherein, the preset processing includes saving the national cryptographic CA certificate, authentication certificate and encryption certificate of the client set in the webpage view, saving the national cryptographic authentication private key and encryption private key of the client set in the webpage view, providing a target interface corresponding to the preset webpage view network module, and encapsulating the target operation interface of the BoringSSL module located in the national cryptographic SSL functional component.

[0068] As can be seen, this application first obtains the target network request initiated by the client through the webpage view interface, and obtains the preset protocol type identifier in the interface layer of the webpage view; it determines whether the preset protocol type identifier is a preset default identifier, and if not, it determines whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier; if the preset protocol type identifier is the preset national cryptographic SSL connection identifier, it initiates a network connection based on the national cryptographic SSL protocol by calling the preset processing of the certificate and private key processing module in the national cryptographic SSL functional component, so as to display the target webpage; wherein, the preset processing includes saving the national cryptographic CA certificate, authentication certificate and encryption certificate of the client set by the webpage view, saving the national cryptographic authentication private key and encryption private key of the client set by the webpage view, providing a target interface corresponding to the preset webpage view network module, and encapsulating the target operation interface of the BoringSSL module in the national cryptographic SSL functional component. Therefore, this application obtains the target network request initiated by the client and the preset protocol type identifier. If the preset protocol type identifier is not the preset default identifier, it means that a protocol type has been set. Therefore, it further determines whether the preset protocol type identifier is the preset national cryptographic SSL connection identifier. If so, it uses the national cryptographic SSL function component to initiate a network connection based on the national cryptographic SSL protocol in order to display the target webpage. Therefore, it can meet the national requirements for supporting the national cryptographic SSL protocol in standards such as Cybersecurity Classified Protection 2.0.

[0069] Figure 7 This is a block diagram illustrating an electronic device 200 according to an exemplary embodiment. Figure 7 As shown, the electronic device 200 may include a processor 201 and a memory 202. The electronic device 200 may also include one or more of a multimedia component 203, an input / output (I / O) interface 704, and a communication component 705.

[0070] The processor 201 controls the overall operation of the electronic device 200 to complete all or part of the steps in the webpage display method described above. The memory 202 stores various types of data to support the operation of the electronic device 200. This data may include, for example, instructions for any application or method operating on the electronic device 200, and application-related data such as contact data, sent and received messages, images, audio, video, etc. The memory 202 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. Multimedia component 203 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 202 or transmitted via communication component 205. The audio component also includes at least one speaker for outputting audio signals. I / O interface 204 provides an interface between processor 201 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 205 is used for wired or wireless communication between the electronic device 200 and other devices. Wireless communication may include Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of these. Therefore, the corresponding communication component 205 may include a Wi-Fi module, a Bluetooth module, or an NFC module.

[0071] In an exemplary embodiment, the electronic device 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the web page display method described above.

[0072] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the webpage display method described above. For example, the computer-readable storage medium may be the memory 202 including the program instructions described above, which may be executed by the processor 201 of the electronic device 200 to complete the webpage display method described above.

[0073] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.

[0074] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0075] The foregoing has provided a detailed description of a webpage display method, apparatus, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A webpage display method, characterized in that, A target webpage view framework that is pre-integrated with TLS and Chinese national cryptographic SSL functional components, including: The target network request initiated by the client is obtained through the web view interface, and the preset protocol type identifier of the interface layer in the web view is obtained; Determine whether the preset protocol type identifier is a preset default identifier; otherwise, determine whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier. If the preset protocol type identifier is the preset national cryptographic SSL connection identifier, then by calling the preset processing in the certificate and private key processing module of the national cryptographic SSL functional component, a network connection based on the national cryptographic SSL protocol is initiated to display the target webpage; wherein, the preset processing includes saving the national cryptographic CA certificate, authentication certificate and encryption certificate of the client set in the webpage view, saving the national cryptographic authentication private key and encryption private key of the client set in the webpage view, providing a target interface corresponding to the webpage view network module, and encapsulating the target operation interface of the BoringSSL module located in the national cryptographic SSL functional component.

2. The webpage display method according to claim 1, characterized in that, After determining whether the preset protocol type identifier is a preset default identifier, the method further includes: If the preset protocol type identifier is determined to be the preset default identifier, then the preset processing of the certificate and private key processing module located in the national cryptographic SSL function component is invoked through the web view network module to initiate a network connection based on the national cryptographic SSL protocol.

3. The webpage display method according to claim 2, characterized in that, After initiating a network connection based on the national cryptographic SSL protocol by calling the preset processing of the certificate and private key processing module located in the national cryptographic SSL functional component through the web view network module, the method further includes: Obtain the connection result of the network connection based on the national cryptographic SSL protocol, and determine whether the connection result meets the preset success conditions; If the connection result does not meet the preset success condition, a network connection based on the TLS protocol is initiated by calling the certificate processing module interface in the TLS functional component through the web page view network module.

4. The webpage display method according to claim 1, characterized in that, After determining whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier, the method further includes: If the preset protocol type identifier is not the preset national cryptographic SSL connection identifier, then a network connection based on the TLS protocol is initiated by calling the certificate processing module interface in the TLS functional component through the web page view network module.

5. The webpage display method according to claim 1, characterized in that, Also includes: Construct a national cryptographic SSL functional component that supports national cryptographic SSL certification; The national cryptographic SSL function component is added to the webpage view component library, which exists in the form of a development package, in the webpage view framework to obtain the target webpage view framework.

6. The webpage display method according to claim 5, characterized in that, The process of constructing the national cryptographic SSL functional component that supports national cryptographic SSL certification also includes: Construct a national cryptographic SSL protocol that supports the ECC-SM4-SM3 and ECDHE-SM4-SM3 suites, and add the SM2, SM3 and SM4 algorithms to the preset Crypto module.

7. The webpage display method according to any one of claims 1 to 6, characterized in that, The process of initiating a network connection based on the Chinese national cryptographic SSL protocol also includes: The certificate and private key processing module sets the national cryptographic certificate, the encryption certificate, the national cryptographic certificate private key, and the encryption private key into the BoringSSL module; The CA certificate is used to verify the peer certificate through the certificate operation interface in the BoringSSL module.

8. A webpage display device, characterized in that, A target webpage view framework that is pre-integrated with TLS and Chinese national cryptographic SSL functional components, including: The identifier acquisition module is used to acquire the target network request initiated by the client through the web page view interface, and to acquire the preset protocol type identifier of the interface layer in the web page view; The judgment module is used to determine whether the preset protocol type identifier is a preset default identifier; otherwise, it determines whether the preset protocol type identifier is a preset national cryptographic SSL connection identifier. The webpage display module is used to initiate a network connection based on the national cryptographic SSL protocol by calling the preset processing of the certificate and private key processing module located in the national cryptographic SSL functional component if the preset protocol type identifier is the preset national cryptographic SSL connection identifier, so as to display the target webpage; wherein, the preset processing includes saving the national cryptographic CA certificate, authentication certificate and encryption certificate of the client set in the webpage view, saving the national cryptographic authentication private key and encryption private key of the client set in the webpage view, providing a target interface corresponding to the webpage view network module, and encapsulating the target operation interface of the BoringSSL module located in the national cryptographic SSL functional component.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the webpage display method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the webpage display method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Secure communication method and device for loading H5 page request and medium

    CN112464129A

  • Method and device for processing HTTPS (Hyper Text Transfer Protocol Secure Security) request based on national secret and international algorithms

    CN114553476A