Guomi HTTPS Deployment Guide: TLCP Protocol, SM2 Dual Certificates, and nginx with Tongsuo
Why regular HTTPS fails the assessment
Let's Encrypt, DigiCert and the usual certificates run an international algorithm stack: RSA/ECDHE key exchange, SHA-256 digests. The Chinese commercial-cryptography application security assessment (miping) and MLPS level-3 crypto requirements mandate national algorithms on the transport path — which cascades into three demands: SM2 certificates, a TLCP (or assessment-recognized Guomi transport) handshake, and SM-family record protection. Walk into an assessment with an RSA certificate and that line item loses points outright.
For algorithm-layer selection see Chinese cryptography introduction; for the standard-number wall see SM standard numbers. This article stays on the protocol layer: handshake, dual certificates, nginx/Tongsuo, and troubleshooting.
TLCP: a separate transport line
TLCP (Transport Layer Cryptographic Protocol, commonly anchored on GB/T 38636-2020) is not "TLS with a few suite names swapped" — it is an independent protocol line in domestic compliance contexts, roughly analogous in role to TLS 1.2-era thinking. It runs parallel to RFC 8998 (SM2/SM3/SM4 bound into TLS 1.3 as ShangMi):
| TLCP | RFC 8998 ShangMi | |
|---|---|---|
| Protocol feel | More often named in assessment / MLPS fieldwork | TLS 1.3 international profile |
| Certificates | Signing + encryption dual certificates (common) | Depends on the gateway |
| Typical stacks | Tongsuo / GmSSL and peers | TLS 1.3 stacks claiming ShangMi |
| Browsers | Guomi / enterprise browsers | Stock Chrome usually incomplete |
Do not pen "supports RFC 8998" and "passes TLCP assessment items" as the same sentence — reviewers may only credit one track. Ask which track the audit recognizes before you freeze the entry topology.
Dual certificates: signing + encryption
The most common conceptual trap in TLCP is two certificates with different roles:
| Certificate | Algorithm | Role | Typical Key Usage bits |
|---|---|---|---|
| Signing cert | SM2 | Identity, handshake signature | digitalSignature |
| Encryption cert | SM2 | Encrypts the premaster (key-exchange direction) | keyEncipherment / keyAgreement |
Certificate authorities (CFCA, iTrustAsia and others) usually issue both together. Ordering is sensitive in nginx/Tongsuo — signing pair first, encryption pair second; swap them and Guomi clients fail while the international stack can still look fine.
After you receive the PEMs, paste each into this site's certificate decoder (local parse, no upload) and check three things:
- Signature / public-key algorithms resolve to names like
SM2 with SM3andSM2 Public Key(not raw OID1.2.156.10197…). - Key Usage: the signing cert should include
digitalSignature; the encryption cert should includekeyEnciphermentorkeyAgreement— identical usage on both files is a red flag for swapped or wrong files. - SAN / CN: hostnames cover the Guomi entry you actually publish.
The decoder reads X.509 fields only; it does not speak TLCP or prove dual-stack success.
Building a TLCP-capable nginx with Tongsuo
OpenSSL mainline has no TLCP. The common community path is Tongsuo (formerly BabaSSL), Ant Group's OpenSSL branch; GmSSL is the other frequent stack. Sketch for Tongsuo + nginx (flags drift by version — lock to the release notes you build):
# 1. Build Tongsuo (enable-ntls is the usual switch name)
./config enable-ntls
make && make install
# 2. Point nginx at Tongsuo with ntls
./configure --with-openssl=../tongsuo \
--with-openssl-opt="enable-ntls no-shared"
make && make install
Essential nginx shape (illustrative):
ssl_certificate sign.crt; # signing certificate
ssl_certificate_key sign.key;
ssl_certificate enc.crt; # encryption certificate (second pair)
ssl_certificate_key enc.key;
ssl_ciphers ECC-SM2-SM4-SM3:ECC-SM2-SM4-SM3-SHA256;
With newer Tongsuo nginx patches, an enable_ntls on; style directive can let one port 443 carry both Guomi dual certificates and an international certificate — Guomi browsers negotiate TLCP while stock Chrome negotiates TLS 1.2/1.3. Whether single-port dual-stack is available depends on the patch and config you actually built; when it is not, the usual fallback is two ports or two VIPs, not forcing international clients onto a pure TLCP listener.
The browser reality
Stock Chrome, Firefox and Safari still cannot complete a full TLCP handshake. Clients that can:
- 360 Secure Browser (Guomi mode; large in government/enterprise procurement)
- MeSignEdge, Lotus Browser and other dedicated Guomi browsers
- Server-to-server: Java (BouncyCastle / Tongsuo JNI), Guomi-capable load balancers and gateways
Typical topology: a dual-stack (or dual-port) entry for government/enterprise traffic, an international-certificate entry for the general public — coexistence, not a hard cutover.
Troubleshooting order when handshakes fail
Follow this order before re-running application-layer SM2 vectors:
-
Right files, right order
Decode both PEMs' Key Usage; signing pair first in nginx. Guomi curl works but browsers fail → check order and certificate roles first. -
Suite lists aligned
Server enables onlyECC-SM2-SM4-SM3while the client wantsECC-SM4-SM3-SHA256(or a vendor alias) — alignssl_ciphersand the client allow-list. Suite strings must match your Tongsuo/nginx version docs; do not copy unverified aliases from random posts. -
"Certificates swapped, protocol unchanged"
SM2 certs on an international TLS listener still count as "algorithms not Guomi end-to-end". Confirm on a Guomi client that the negotiated protocol is TLCP (or the ShangMi track the audit accepts). -
International path not regressed
After Guomi changes, hit the same hostname with stock Chrome. If the international path breaks, inspectenable_ntls, which certificates are mounted where, and whether the internationalssl_certificatewas overwritten. -
Do not treat algorithm interop as protocol acceptance
This site's SM2 / SM3 / SM4 pages verify application-layer primitives (SM4 here is ECB/CBC, not RFC 8998 GCM/CCM). Passing message vectors ≠ TLCP handshake success. For international TLS, a HAR viewer shows negotiated suites; pure TLCP needs a Guomi client or Tongsuo-side tooling.
Checklist before assessment day
- Dual certificates issued; paths and permissions correct; signing pair first; at least one Guomi-browser handshake recorded with suite name.
- TLCP listener cipher list pinned to the Guomi family — do not mix international suites "for convenience" unless your dual-stack docs explicitly allow it on that listener.
- International-certificate listener still healthy on the same hostname or a parallel entry.
- Session resumption / long-lived connections documented: handshake-heavy loads need tickets and connection reuse, not only more cores.
- Boundary clear: Guomi requirements live at the public edge; whether the backbone may stay cleartext or standard TLS should be written into the design before the assessor asks.
Performance: the dual-certificate tax (order of magnitude)
Dual-certificate handshakes usually cost two SM2-related operations server-side (sign + key-exchange direction). On common CPUs SM2 acceleration lags ECDSA P-256. At handshake-heavy loads, roughly 1.5–2.5× handshake CPU versus TLS 1.3 with ECDSA is a common ballpark (measure your hardware). Mitigations that matter: session resumption, HTTP/2 connection reuse, and terminating TLCP at the edge with a standard internal hop — the mandate often stops at the public boundary, not every mesh hop.
When RFC 8998 instead of TLCP
Multinationals and teams that need TLS 1.3 toolchain interop evaluate ShangMi (RFC 8998). A pragmatic topology is often TLCP on the domestic entry, international TLS 1.3 on the global entry, ShangMi held as a convergence candidate — which track counts is a policy answer each year, not pure engineering preference. Do not treat "SM4-CBC interop succeeded" as proof that ShangMi record-layer GCM/CCM works.
Implementer's note
Our Guomi tool family (SM2, SM3, SM4) and the certificate decoder run entirely in the browser: Web Crypto ships no national algorithms, so SM work uses pure-JS sm-crypto — learning, vectors, and interop, not bulk encryption or assessment protocol acceptance. The certificate decoder recognizes SM2/SM3-related OIDs and parses SAN plus Key Usage so you can tell signing vs encryption roles apart; it still does not perform a TLCP handshake. Standard-number map: quick reference. Application-layer pitfalls: SM2/SM3/SM4 in practice.
Related Tools
Related Articles
Post-Quantum Migration Self-Check: From Algorithm Inventory to Hybrid TLS — 12 Things to Do in 2026
A practical self-check framework for PQC migration: why three overlapping regulatory timelines make 2026 the starting line, how to build a cryptographic bill of materials (CBOM), ranking by HNDL exposure, enabling X25519+ML-KEM hybrid TLS, and what crypto-agility means in practice. With a 12-item checklist.
Passkeys, Explained: Why the Server Can No Longer Hold a Copy of Your Password
Passkeys (WebAuthn/FIDO2) deepened: registration vs assertion ceremonies, platform authenticators and roaming keys, synced passkeys, how they relate to passwords/TOTP/JWT, and why origin binding makes phishing resistance structural. Servers store public keys only; note that this site has no dedicated Passkey tool page.
ML-KEM, Explained: How Kyber Got Into Your TLS Handshake
An engineering tour of ML-KEM (FIPS 203, formerly Kyber): Kyber-to-standard naming, encapsulate/decapsulate and IND-CCA, the three parameter sizes, how X25519+ML-KEM feeds the TLS 1.3 HKDF schedule, the ClientHello-bloat middlebox trap, OpenSSL 3.5 / nginx enablement, and browser-side implementation boundaries.