Files
Knowledge/sunyard/7 信安/SSL VPN/nginx-with-openHiTLS:基于 Nginx 的国密改造实践.md
T

634 lines
29 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
该文章已生成可运行项目,预览并下载项目源码
      在[数字经济](https://so.csdn.net/so/search?q=%E6%95%B0%E5%AD%97%E7%BB%8F%E6%B5%8E&spm=1001.2101.3001.7020)加速发展的今天,网络通信安全已成为关键基础设施的核心保障。我国自主研发的国密算法(如 SM2、SM3、SM4 等)作为国家密码标准,在金融、政务、能源等关键领域的合规要求日益明确。然而,传统 Web 服务器(如 Nginx)主要支持国际通用加密算法(如 RSA、ECC),难以直接满足国密合规需求。在此背景下,openHiTLS 社区推出的 “nginx-with-openHiTLS” 项目应运而生,通过集成自主创新的 openHiTLS 密码库,为 Nginx 赋予国密算法与 TLCP 协议支持,成为构建安全可靠加密体系的重要技术方案。
### 国密改造的核心诉求:
       [国密算法](https://so.csdn.net/so/search?q=%E5%9B%BD%E5%AF%86%E7%AE%97%E6%B3%95&spm=1001.2101.3001.7020)(国家商用密码算法)是我国自主设计的加密标准,包括 SM2(非对称加密)、SM3(哈希算法)、SM4(对称加密)等,旨在保障国家信息安全与数据主权。随着《网络安全法》《密码法》等法规的实施,关键行业对 “国密合规” 的要求已从 “可选” 变为 “强制”。
      传统 Nginx 作为全球主流的 Web 服务器,虽支持 TLS 1.2/1.3 等国际协议,但缺乏对国密算法及 TLCP(传输层密码协议,我国基于国密算法的 TLS 协议标准)的原生支持。若要在关键业务中使用 Nginx,必须通过技术改造实现国密协议与算法的集成 —— 这正是 openHiTLS 社区的核心目标:**基于 Nginx 稳定版本(1.24),通过集成 openHiTLS 密码库,让 Web 服务无缝支持国密标准,同时保留 Nginx 原有的高性能与稳定性**。
### nginx-with-openHiTLS:技术特性解析
nginx-with-openHiTLS 并非对 Nginx 的重构,而是在其基础上进行模块化扩展,核心特性包括:
1. **原生支持 TLCP 协议**
作为国密标准的传输层协议,TLCP 可基于 SM2/SM3/SM4 算法实现端到端加密,解决了传统 TLS 协议依赖国际算法的合规性问题。
2. **兼容 TLS 1.2 协议**
保留对国际通用协议的支持,满足混合加密场景需求(如同时服务国内合规用户与国际用户)。
3. **完善的客户端证书验证机制**
支持基于国密证书的双向认证,可通过配置 CA 证书链与验证深度,强化对客户端身份的合法性校验,适用于金融交易、政务服务等高安全场景。
### 部署指南:从编译到运行的全流程
nginx-with-openHiTLS 的部署需依赖 openHiTLS 密码库的编译与集成,以下为详细步骤(基于 Linux 系统):
#### 1. 环境准备
确保系统满足基础依赖:
- 操作系统:Linux(如 CentOS、Ubuntu)
- 编译工具:GCC 编译器、Make 工具
- 依赖库:PCRE(正则表达式支持)
#### 2. 编译 openHiTLS 密码库
bash
```cobol
# 1. 克隆代码仓库git clone https://gitcode.com/openHiTLS/openhitls.git # 2. 进入目录并创建构建文件夹cd openHiTLS && mkdir -p ./build && cd ./build # 3. 生成构建配置(根据架构选择)# 3.1 通用64位构建python3 ../configure.py --enable hitls_bsl hitls_crypto hitls_tls hitls_pki hitls_auth --lib_type static --bits=64 --system=linux # 3.2 x86_64架构优化构建python3 ../configure.py --enable hitls_bsl hitls_crypto hitls_tls hitls_pki hitls_auth --lib_type static --bits=64 --system=linux --asm_type x8664 # 3.3 armv8架构优化构建python3 ../configure.py --enable hitls_bsl hitls_crypto hitls_tls hitls_pki hitls_auth --lib_type static --bits=64 --system=linux --asm_type armv8 # 4. 生成构建脚本并编译安装cmake ..make && make install
```
#### 3. 编译并安装 nginx-with-openHiTLS
bash
```cobol
# 1. 配置Nginx编译选项(指定openHiTLS路径)cp auto/configure ../configure --prefix=/path/to/install \ --with-cc-opt="-std=c99" \ --with-http_ssl_module \ --with-openhitls=/path/to/openhitls # 替换为openHiTLS实际安装路径 # 2. 编译并安装make && make install
```
#### 4. 国密协议配置示例
部署完成后,需通过 Nginx 配置文件启用 TLCP 协议与国密证书,典型配置如下:
nginx
```cobol
server { listen 443 ssl; server_name example.com; # 替换为实际域名 # 启用TLCP协议(国密传输层协议) ssl_protocols TLCP; # 国密证书配置(需同时指定签名与加密证书) ssl_certificate /path/to/sign.crt; # 签名证书(SM2) ssl_certificate /path/to/enc.crt; # 加密证书(SM2) ssl_certificate_key /path/to/sign.key; # 签名私钥 ssl_certificate_key /path/to/enc.key; # 加密私钥 # 客户端证书验证(双向认证场景) ssl_verify_client on; # 开启客户端验证 ssl_client_certificate /path/to/ca-chain.crt; # 客户端CA证书链 ssl_verify_depth 3; # 验证深度(最多追溯3级CA)}
```
#### 5. 启动与验证
bash
```cobol
# 进入安装目录cd /path/to/nginx # 指定配置文件启动./sbin/nginx -c ./conf/nginx.conf # 验证启动状态(查看错误日志排查问题)tail -f /path/to/nginx/error.log
```
### 关键注意事项与故障排除
1. **证书格式与权限**
国密证书需使用 PEM 格式,且证书 / 私钥文件权限需限制为`600`(仅所有者可读写),避免权限泄露导致安全风险。
2. **TLCP 协议的特殊要求**
启用 TLCP 时必须同时配置签名证书与加密证书(国密算法设计要求),缺少任一证书会导致协议握手失败。
3. **常见错误排查**
- 证书格式错误:通过`openssl x509 -in cert.crt -text`验证 PEM 格式合法性;
- 依赖缺失:编译失败时检查 GCC、PCRE 等依赖是否安装完整;
- 协议不兼容:客户端需支持 TLCP 协议才能建立连接,可通过`openssl s_client -connect example.com:443 -tls1_2`测试基础连通性。
### 开源实践:nginx-with-openHiTLS开源代码实现
代码下载链接:[GitCode - 全球开发者的开源社区,开源代码托管平台](https://gitcode.com/openHiTLS/nginx/tree/branches/stable-1.24/src "GitCode - 全球开发者的开源社区,开源代码托管平台")
> 【openHiTLS密码开源社区】
>
>  openHiTLS旨在打造算法先进、性能卓越、高效敏捷、安全可靠的密码套件,通过轻量级、可剪裁的软件技术架构满足各行业不同场景的多样化要求,让密码技术应用更简单,同时探索后量子等先进算法创新实践,构建密码前沿技术底座!
>  项目地址:[https://gitcode.com/openHiTLS/openhitls](https://gitcode.com/openHiTLS/openhitls "https://gitcode.com/openHiTLS/openhitls")
![](https://i-blog.csdnimg.cn/direct/c19256d9901241a6a30afa567744a1bc.png)密码开源先锋聚焦密码学与开源技术的知识分享平台
![](https://g.csdnimg.cn/extension-box/2.0.0/image/weixin.png)微信公众号
![](https://g.csdnimg.cn/extension-box/2.0.0/image/ic_move.png)
本文章已经生成可运行项目一键运行
生成项目![查看更多](https://csdnimg.cn/release/blogv2/dist/pc/img/btnInscodeAiAskWhite.png)
关注博主即可阅读全文 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/arrowDownAttend.png) 
[![](https://i-avatar.csdnimg.cn/355cd0deee474cf1ba93a435aae2c294_openHiTLS.jpg!1)openHiTLS密码开源社区](https://openhitls.blog.csdn.net/)
关注
- ![](https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/like.png)38
- ![](https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/unlike.png)
- ![](https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/collect.png)32
觉得还不错?一键收藏![](https://csdnimg.cn/release/blogv2/dist/pc/img/collectionCloseWhite.png)
- [![](https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/comment.png)0](https://blog.csdn.net/openHiTLS/article/details/150497042#commentBox)
- ![](https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/share.png)分享
- ![](https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/more.png)
专栏目录
[
_nginx_ 同一端口同时支持_国密_和标_密_功能
](https://blog.csdn.net/Big_Bristlegass/article/details/140845641)
[Big_Bristlegass的博客](https://blog.csdn.net/Big_Bristlegass)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 1810
[
_nginx_支持同一端口,支持_国密_和标_密_
](https://blog.csdn.net/Big_Bristlegass/article/details/140845641)
[
_NGINX_学习记录__nginx_ root
](https://blog.csdn.net/qq_43542296/article/details/127204254)
12-19
[
worker_processes和worker_connections可以实际的设置_nginx_的总体最大连接数,比如worker_processes设置为2,worker_connections设置为1024,那么_nginx_的总体最大连接数就是2048个。但是这些连接数,不仅包含了_nginx_和客户端的链接,还包含了_nginx_和被代理的服务端的链接,因此不代表_nginx_的并发能力是2048,具体设置多少,要根据压测...
](https://blog.csdn.net/qq_43542296/article/details/127204254)
[
HTTPS配置_-__-_基于_nginx_
](https://blog.csdn.net/nero_claudius/article/details/91891384)
12-12
[
_nginx__:_[emerg]the"ssl"parameter requires ngx_http_ssl_modulein/usr/local/_nginx_/conf/_nginx_.conf 智能体编程shell 1 查看你最初配置_nginx_时的参数 /usr/local/_nginx_/sbin/_nginx_ _-_V 智能体编程shell 1 显示如下(如果没有–_with__-_http_ssl_module,则说明未添加http_ssl_module模块) configure arguments_:_ _-__-_pref...
](https://blog.csdn.net/nero_claudius/article/details/91891384)
[
_nginx__国密_证书(gmssl)安装
](https://blog.csdn.net/qq_44877496/article/details/138184055)
[qq_44877496的博客](https://blog.csdn.net/qq_44877496)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 4237
[
本文档基于此安装包安装若目标机无法上网,无法执行yum,可通过手动下载安装包,rpm执行安装,部分rpm安装包如下。
](https://blog.csdn.net/qq_44877496/article/details/138184055)
[
_nginx_深度学习2——https之生成秘钥和CA证书
](https://blog.csdn.net/qq_22059611/article/details/89082938)
[苏云南雁的博客](https://blog.csdn.net/qq_22059611)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 665
[
openssl version 查看 _nginx_ _-_v 1,生成秘钥和CA证书 步骤一:生成key秘钥 步骤二:生成证书签名请求文件(csr文件) 步骤三:生成证书签名文件(CA证书,一般是第三方,学习过程可以自己弄) 具体步骤,在_nginx_下建立一个目录,输入: openssl genrsa _-_idea _-_out jesonc.key 1024 然后输入验证_密_码,然后...
](https://blog.csdn.net/qq_22059611/article/details/89082938)
[
配置_Nginx_,完善_Nginx_启动脚本_上线时脚本修改_nginx_配置
](https://blog.csdn.net/jun54555/article/details/4207961)
12-18
[
Starting _nginx__-_0.6.17_:_ start_-_stop_-_daemon_:_ /lib/tls/libc.so.6_:_ version `GLIBC_2.4' not found (required by start_-_stop_-_daemon) # ls _-_lt /lib/tls/libc* # 版本过低,在Ubuntu中【/lib/libc.so.6 _-_> libc_-_2.6.1.so】 lrwxrwxrwx 1 root root 13 Mar 1 2007 /lib/tls/libc.so.6 _-_> l...
](https://blog.csdn.net/jun54555/article/details/4207961)
[
深度学习_Nginx_第二章_:__Nginx_ 关于SSL安全协议__nginx_ ssl 算法
](https://blog.csdn.net/ligupeng7929/article/details/97752462)
9-27
[
深度学习_Nginx_第二章_:__Nginx_ 关于SSL安全协议 本文深入探讨了_Nginx_在SSL安全协议中的作用,包括对称加_密_、非对称加_密_原理,CA如何验证证书及防止证书过期,以及不同类型的SSL证书。此外,还详细介绍了TLS通讯过程,并着重分析了_Nginx_在握手性能方面的考虑,特别是对称加_密_和非对称加_密_算法的影响。
](https://blog.csdn.net/ligupeng7929/article/details/97752462)
[
【_密_码学实战】_openHiTLS_ mac命令行:消息认证码工具
最新发布
](https://openhitls.blog.csdn.net/article/details/152713883)
[开源代码仓:https://gitcode.com/openHiTLS/openhitls](https://blog.csdn.net/openHiTLS)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 1107
[
`hitls mac`是_openHiTLS__密_码工具包中用于计算消息认证码(MAC)的命令行工具,核心功能为验证消息完整性与真实性。它支持HMAC、CMAC、GMAC及_国密_(SM3、SM4_-_CBC_-_MAC)等多类算法,提供_密_钥(明文/十六进制)、输入输出(文件/标准流、二进制/十六进制)等丰富选项,兼具硬件加速、大文件分块处理等性能优化特性。
](https://openhitls.blog.csdn.net/article/details/152713883)
[
天安tassl+原生_nginx_搭建_国密_网站
](https://blog.csdn.net/qlau2007/article/details/139225533)
[qlau2007的博客](https://blog.csdn.net/qlau2007)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 2107
[
基于天安tassl和原生_nginx_搭建_国密_网站测试
](https://blog.csdn.net/qlau2007/article/details/139225533)
[
_Nginx___nginx_100%windows
](https://blog.csdn.net/m0_74337295/article/details/134035058)
12-19
[
_Nginx_配置 3.1 _nginx_的基本功能 3.2 _nginx_的扩展功能 4. _nginx_的模块与工作原理 4.1 _nginx_的模块分类 4.2_nginx_工作原理 4.3echo模块用法 5.1_nginx_的安装 5.2_nginx_安装后配置 6.1 _nginx_.conf配置详解 6.2 用于调试、定位问题的配置参数 6.3 正常运行必备的配置参数 ...
](https://blog.csdn.net/m0_74337295/article/details/134035058)
[
_Nginx_手册_输入一个路径,实现将该路径下所有的文件归类。相同类型的文...
](https://blog.csdn.net/weixin_38374686/article/details/127720596)
12-17
[
–prefix=/usr/local/_nginx_ –user=_nginx_ –group=_nginx_ –_with_out_-_http_uwsgi_module –_with_out_-_http_scgi_module –_with_out_-_http_browser_module –_with__-_pcre –_with__-_http_addition_module –_with__-_http_ssl_module –_with__-_http_realip_module –_with__-_http_sub_module ...
](https://blog.csdn.net/weixin_38374686/article/details/127720596)
[
_Nginx__国密__改造_
](https://blog.csdn.net/qq_49081692/article/details/130964954)
[qq_49081692的博客](https://blog.csdn.net/qq_49081692)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 4771
[
_国密_web服务器,_国密__nginx_,_nginx__国密_,_国密__改造_
](https://blog.csdn.net/qq_49081692/article/details/130964954)
[
搭建支持_国密_GmSSL的_Nginx_环境
](https://blog.csdn.net/Bejpse/article/details/145804164)
[](https://blog.csdn.net/Bejpse)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 1672
[
2、安装包准备:需要GmSSL、_国密__Nginx_,可通过互联网下载或者从 https_:_//download.csdn.net/download/m0_46665077/89936158 下载_国密_GmSSL安装包和_国密__Nginx_安装包。1.配置 _nginx_ 开机自启,创建 /etc/systemd/system/_nginx_.service 的服务文件。_国_际RSA证书存放:/usr/local/gmssl/ssl/rsa/_国密_证书存放:/usr/local/gmssl/ssl/gm/
](https://blog.csdn.net/Bejpse/article/details/145804164)
[
RSA盲签名技术解析及代码实现_实践__rsa rfc
](https://blog.csdn.net/openHiTLS/article/details/153263461)
11-28
[
5.2 技术_实践__:__openHiTLS_的标准化实现 值得关注的是,_openHiTLS_已基于RFC9474标准完成了RSA盲签名技术的工程化实现,为开发者与企业提供了标准化、高可用的技术工具包。该实现严格遵循“盲化_-_签名_-_去盲”的核心流程,通过关键函数封装算法逻辑,以下结合核心代码片段说明其实现思路_:_ ...
](https://blog.csdn.net/openHiTLS/article/details/153263461)
[
_nginx__-_tmp.tar.gz
](https://download.csdn.net/download/w277608109/19855832)
06-27
[
标签中的“_国密_服务器”表明这个_Nginx_配置是为满足中_国_对加_密_技术的要求而优化的,能够处理基于SM2、SM3和SM4的加_密_通信。 “gmssl静态库_国密_版”进一步确认了库文件是GMSSL的静态版本,集成了中_国_的加_密_算法。 ...
](https://download.csdn.net/download/w277608109/19855832)
[
信创_-__nginx__-__国密_ssl_改造_
](https://blog.csdn.net/twobun/article/details/136169543)
[twobun的博客](https://blog.csdn.net/twobun)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 2348
[
信创 _nginx_ _国密__改造_
](https://blog.csdn.net/twobun/article/details/136169543)
[
_国密_GmSSL安装包+_国密__Nginx_安装包+搭建_国密_应用服务器
](https://download.csdn.net/download/m0_46665077/89936158)
10-30
[
_国密_GmSSL和_国密__Nginx_是专门为中_国_商用_密码算法_设计的安全工具包,它们在确保网络安全、数据传输加_密_以及防止信息泄露方面发挥着重要作用。GmSSL是基于OpenSSL_改造_的,它支持_国_产_密码算法_,如SM2、SM3、SM4等,可...
](https://download.csdn.net/download/m0_46665077/89936158)
[
换_Nginx__-__with__-_Gmsslv3 怎么编译到_nginx_里面
](https://wenku.csdn.net/answer/5xd6vcxqnr)
09-13
[
现在用户明确询问如何将_Nginx__-__with__-_Gmsslv3(即支持_国密_SSL协议版本3的_Nginx_)编译到_Nginx_中。注意,用户提到的“_Nginx__-__with__-_Gmsslv3”可能是一个特定的支持_国密_的_Nginx_分支或补丁。 根据之前的知识,我们知道...
](https://wenku.csdn.net/answer/5xd6vcxqnr)
[
编译 _Nginx__-__with__-_GmSSLv3 时可能会遇到哪些常见错误及解决办法?
](https://wenku.csdn.net/answer/12findmsna)
09-13
[
如何验证_Nginx__-__with__-_GmSSLv3是否成功支持_国密_算法? 2. 在_Nginx__-__with__-_GmSSLv3中如何配置_国密_双证书? 3. 运行_Nginx__-__with__-_GmSSLv3时可能遇到哪些问题? 4. 如何调试_Nginx__-__with__-_GmSSLv3的TLS握手过程? ### 编译 ...
](https://wenku.csdn.net/answer/12findmsna)
[
编译_nginx_支持_国密_SSL协议
](https://devpress.csdn.net/v1/article/detail/108080409)
[gmssl的博客](https://blog.csdn.net/gmssl)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 6619
[
1 背景 _Nginx_自身支持标准的SSL协议,但并不支持_国密_SSL协议。本文描述了_Nginx_配置的_国密_SSL协议(单向)的完整过程,仅供学习和参考之用。 _Nginx_无需修改源码、支持任意版本_Nginx_。 2 环境 服务器OS是CentOS7.7的64位版本,IP位192.168.0.98,客户端OS是WindowsXP。 _Nginx_是_Nginx__-_1.18.0。 浏览器是360安全浏览器(支持_国密_)。 3 安装方法一:源码编译 GMSSL.cn提供一个OpenSSL的_国密_版库,可与_nginx_编译,生成的ngi
](https://devpress.csdn.net/v1/article/detail/108080409)
[
_Nginx__国密_化
](https://blog.csdn.net/xuxunaa/article/details/126589156)
[前端摸鱼第一名](https://blog.csdn.net/xuxunaa)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 2984
[
【代码】_Nginx__国密_化保姆教程
](https://blog.csdn.net/xuxunaa/article/details/126589156)
[
ubuntu18.04搭建基于_国密_算法的_nginx_环境
](https://devpress.csdn.net/v1/article/detail/122635880)
[a1309525802的博客](https://blog.csdn.net/a1309525802)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 4741
[
ubuntu18.04搭建基于_国密_算法的_nginx_环境 ubuntu18.04安装 https_:_//mirrors.tuna.tsinghua.edu.cn/ubuntu_-_releases/18.04/ 可以选择安装桌面版的或者服务器版的,看个人需求 安装基本依赖 #进入root用户 sudo _-_i #更新源 apt update apt upgrade #安装gcc apt install gcc #安装make apt install make #安装git apt install git #安装li
](https://devpress.csdn.net/v1/article/detail/122635880)
[
麒麟V10安装支持_国密_GmSSL的_Nginx_
](https://blog.csdn.net/qq_37437139/article/details/145136608)
[qq_37437139的博客](https://blog.csdn.net/qq_37437139)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 1867
[
按照官网的操作配置完了不好使,还没解决
](https://blog.csdn.net/qq_37437139/article/details/145136608)
[
构建网络信息安全的中_国_方案 _-_ _国密_SSL/_TLCP_协议介绍以及_国密__Nginx_服务器部署
热门推荐
](https://devpress.csdn.net/v1/article/detail/134562784)
[new9232的博客](https://blog.csdn.net/new9232)
 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 1万+
[
_国密_SSL协议指的是采用_国密_算法,符合_国密_标准的安全传输协议。简而言之,_国密_SSL就是SSL/TLS协议的_国密_版本。
](https://devpress.csdn.net/v1/article/detail/134562784)
- [关于我们](https://www.csdn.net/company/index.html#about)
- [招贤纳士](https://www.csdn.net/company/index.html#recruit)
- [商务合作](https://fsc-p05.txscrm.com/T8PN8SFII7W)
- [寻求报道](https://marketing.csdn.net/questions/Q2202181748074189855)
- ![](https://g.csdnimg.cn/common/csdn-footer/images/tel.png)400-660-0108
- ![](https://g.csdnimg.cn/common/csdn-footer/images/email.png)[kefu@csdn.net](mailto:webmaster@csdn.net)
- ![](https://g.csdnimg.cn/common/csdn-footer/images/cs.png)[在线客服](https://csdn.s2.udesk.cn/im_client/?web_plugin_id=29181)
- 工作时间 8:30-22:00
- [公安备案号11010502030143](http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502030143)
- [京ICP备19004658号](http://beian.miit.gov.cn/publish/query/indexFirst.action)
- [京网文〔2020〕1039-165号](https://csdnimg.cn/release/live_fe/culture_license.png)
- [经营性网站备案信息](https://csdnimg.cn/cdn/content-toolbar/csdn-ICP.png)
- [北京互联网违法和不良信息举报中心](http://www.bjjubao.org/)
- [家长监护](https://download.csdn.net/tutelage/home)
- [网络110报警服务](https://cyberpolice.mps.gov.cn/)
- [中国互联网举报中心](http://www.12377.cn/)
- [Chrome商店下载](https://chrome.google.com/webstore/detail/csdn%E5%BC%80%E5%8F%91%E8%80%85%E5%8A%A9%E6%89%8B/kfkdboecolemdjodhmhmcibjocfopejo?hl=zh-CN)
- [账号管理规范](https://blog.csdn.net/blogdevteam/article/details/126135357)
- [版权与免责声明](https://www.csdn.net/company/index.html#statement)
- [版权申诉](https://blog.csdn.net/blogdevteam/article/details/90369522)
- [出版物许可证](https://img-home.csdnimg.cn/images/20250103023206.png)
- [营业执照](https://img-home.csdnimg.cn/images/20250103023201.png)
- ©1999-2025北京创新乐知网络技术有限公司
[![](https://i-avatar.csdnimg.cn/355cd0deee474cf1ba93a435aae2c294_openHiTLS.jpg!1)](https://openhitls.blog.csdn.net/)
[openHiTLS密码开源社区](https://openhitls.blog.csdn.net/ "openHiTLS密码开源社区")
博客等级 ![](https://csdnimg.cn/identity/blog6.png)
码龄1年
[
189
原创
](https://openhitls.blog.csdn.net/)
3991
点赞
3127
收藏
881
粉丝
关注
[私信](https://im.csdn.net/chat/openHiTLS)
### 更多优质【一键运行】博文
- [1WPS表格在一列里批量导入图片](https://blog.csdn.net/qq_41674785/article/details/134180384)
- [2NumPy常用30个经典案例](https://blog.csdn.net/m0_75067629/article/details/145543113)
- [3基于STM32的智能指针仪表盘系统设计与实现](https://blog.csdn.net/weixin_29476595/article/details/153556122)
- [4chrome浏览器禁用js中的debugger](https://blog.csdn.net/A20190518/article/details/111037945)
- [5C语言 根据年份数与月份数计算某月天数](https://blog.csdn.net/XD_YinG_Ye/article/details/153514582)
[查看更多![查看更多](https://csdnimg.cn/release/blogv2/dist/pc/img/runBlogWhite.png)](https://blog.csdn.net/rank/list/blog_project)
### 热门文章
- [一文搞懂一次性密码:OTP、HOTP、TOTP详解 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 3159](https://openhitls.blog.csdn.net/article/details/151608861)
- [SM4算法工作模式(ECB、CBC、CFB、OFB、CTR、GCM、CCM 、XTS):原理、特点与应用 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 2737](https://openhitls.blog.csdn.net/article/details/151288800)
- [无密码认证FIDO2 框架:重构数字世界的信任基石(附代码示例) ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 2712](https://openhitls.blog.csdn.net/article/details/150954617)
- [唯密文攻击(Ciphertext Only)深度技术解析及未来趋势 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 2684](https://openhitls.blog.csdn.net/article/details/153332376)
- [ChaCha20 密码算法:从原理到代码实现的全方位解析【附源码】 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 2541](https://openhitls.blog.csdn.net/article/details/151066232)
### 分类专栏
- [
![](https://i-blog.csdnimg.cn/columns/default/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)开源社区动态](https://blog.csdn.net/openhitls/category_12997573.html)25篇
- [
![](https://i-blog.csdnimg.cn/columns/default/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)前沿技术动态](https://blog.csdn.net/openhitls/category_12989402.html)56篇
- [
![](https://i-blog.csdnimg.cn/columns/default/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)密码学实战](https://blog.csdn.net/openhitls/category_13027034.html)65篇
- [
![](https://i-blog.csdnimg.cn/columns/default/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)密码学基础](https://blog.csdn.net/openhitls/category_13034220.html)59篇
- [
![](https://i-blog.csdnimg.cn/columns/default/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)密码行业标准](https://blog.csdn.net/openhitls/category_13026355.html)12篇
上一篇:
[SLH-DSA:抗量子时代的 X.509 PKI 数字签名方案](https://blog.csdn.net/openHiTLS/article/details/150487435)
下一篇:
[后量子迁移:Composite ML-DSA复合签名方案解析](https://blog.csdn.net/openHiTLS/article/details/150511107)
### 大家在看
- [Git提交无数量限制](https://blog.csdn.net/zhangchen124/article/details/156199759)
- [华为云CSBS代理核心作用解析 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 518](https://blog.csdn.net/yunlaoda7/article/details/156153098)
- [AI大模型工程师学习指南](https://blog.csdn.net/YoungOne2333/article/details/156199286)
- [爬虫入门:从零解析代码 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png) 546](https://blog.csdn.net/2401_88591507/article/details/156050630)
- [CSS核心概念详解](https://blog.csdn.net/2511_94359082/article/details/156195300)
### 最新文章
- [成长故事 | 华中科技大学金轩宇:从CTF走进开源世界,我的开源探索之旅](https://openhitls.blog.csdn.net/article/details/156070157)
- [成长故事 | 西安电子科技大学杨文杰:从密码套件的调用者成长为开源社区的贡献者](https://openhitls.blog.csdn.net/article/details/155803890)
- [任正非最新讲话!1.4万字全文,信息量很大(任正非与ICPC主席、教练及获奖选手座谈会纪要)](https://openhitls.blog.csdn.net/article/details/155735120)
2025
[12月6篇](https://openhitls.blog.csdn.net/?type=blog&year=2025&month=12)
[11月7篇](https://openhitls.blog.csdn.net/?type=blog&year=2025&month=11)
[10月50篇](https://openhitls.blog.csdn.net/?type=blog&year=2025&month=10)
[09月55篇](https://openhitls.blog.csdn.net/?type=blog&year=2025&month=09)
[08月62篇](https://openhitls.blog.csdn.net/?type=blog&year=2025&month=08)
[07月6篇](https://openhitls.blog.csdn.net/?type=blog&year=2025&month=07)
[06月4篇](https://openhitls.blog.csdn.net/?type=blog&year=2025&month=06)
### 目录
1. [国密改造的核心诉求:](https://blog.csdn.net/openHiTLS/article/details/150497042#t0)
2. [nginx-with-openHiTLS:技术特性解析](https://blog.csdn.net/openHiTLS/article/details/150497042#t1)
3. [部署指南:从编译到运行的全流程](https://blog.csdn.net/openHiTLS/article/details/150497042#t2)
4. 1. [1. 环境准备](https://blog.csdn.net/openHiTLS/article/details/150497042#t3)
2. [2. 编译 openHiTLS 密码库](https://blog.csdn.net/openHiTLS/article/details/150497042#t4)
3. [3. 编译并安装 nginx-with-openHiTLS](https://blog.csdn.net/openHiTLS/article/details/150497042#t5)
4. [4. 国密协议配置示例](https://blog.csdn.net/openHiTLS/article/details/150497042#t6)
5. [5. 启动与验证](https://blog.csdn.net/openHiTLS/article/details/150497042#t7)
5. [关键注意事项与故障排除](https://blog.csdn.net/openHiTLS/article/details/150497042#t8)
6. [开源实践:nginx-with-openHiTLS开源代码实现](https://blog.csdn.net/openHiTLS/article/details/150497042#t9)
收起 ![](https://csdnimg.cn/release/blogv2/dist/pc/img/arrowup-line-top-White.png)
[![](https://i-operation.csdnimg.cn/images/df6c67fa661c48eba86beaeb64350df0.gif)](https://mall.csdn.net/vip?utm_source=25618_vip_blogrighticon)[![](https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/Group.png)](https://ai.csdn.net/chat?utm_source=cknow_pc_blogdetail&spm=1001.2101.3001.10583)![](https://g.csdnimg.cn/side-toolbar/3.6/images/mobile.png)![](https://g.csdnimg.cn/side-toolbar/3.6/images/customer.png)![](https://g.csdnimg.cn/side-toolbar/3.6/images/totop.png)