Comments (3)
BabaSSL实现TLCP协议时,提供了单独的双证书加载API,而不是在原生的SSL_CTX_use_certificate函数做适配。这样做有什么特殊的考虑吗?
如下是BabaSSL新增的API,
SSL_CTX_use_sign_certificate
SSL_CTX_use_enc_certificate
SSL_CTX_use_sign_PrivateKey
SSL_CTX_use_enc_PrivateKey
新增API使得上层应用(例如Nginx)也要适配双证书加载的API。之前GMSSL库是在SSL_CTX_use_certificate函数调用里面做了证书X509v3 Key Usage的判断,这样Nginx可以不用改动代码集成TLCP功能。
猜测BabaSSL这样处理的原因是为了兼容国密单证书草案。BabaSSL提供了3个新增槽位用来加载国密证书。一个提供国密单证书草案使用,另外两个提供给国密双证书。
考虑一种场景:Nginx的server同时配置了 国密单证书 和 国密双证书
如果使用原生的SSL_CTX_use_certificate函数做适配时,无法明确单证书和双证书需要加载到那个槽位。
from tongsuo.
猜测BabaSSL这样处理的原因是为了兼容国密单证书草案。BabaSSL提供了3个新增槽位用来加载国密证书。一个提供国密单证书草案使用,另外两个提供给国密双证书。
考虑一种场景:Nginx的server同时配置了 国密单证书 和 国密双证书
如果使用原生的SSL_CTX_use_certificate函数做适配时,无法明确单证书和双证书需要加载到那个槽位。
是的,这就最核心的原因,保证证书间的区分度,方便debug以及做兼容性方案
from tongsuo.
明白了,多谢解答。
from tongsuo.
Related Issues (20)
- 双向认证时,未发送客户端证书,但是在代码中调用SSL_do_handshake依然返回了成功,如何能判断是否真的成功? HOT 2
- 提高Tongsuo和OpenSSL的兼容性 HOT 2
- tongsuo签名结果与openssl签名结果不互通 HOT 5
- 密码卡适配Tongsuo 8.4 Engine,有适配Tongsuo 8.4 Engine的相关例子代码吗?
- SSL_enable_ntls后无法在client_hello_cb 或 server_name_cb中设置新的SSL CTX HOT 2
- 支持配置证书预压缩功能? HOT 5
- 缺乏ALPN的支持。
- 请问对称加密是否考虑支持 sm4-gcm HOT 2
- sm2 failure and Legacy X25519 PKEY fails in SSL handshake HOT 5
- 用硬算法engine加速SM2签名验签算法时,EVP_PKEY_METHOD的ctrl 和 ctrl_str函数中的 EVP_PKEY_CTRL_SET1_ID消息需要怎么处理?
- 在arm平台下tongsuo与openssl在国密上的性能对比 HOT 2
- 集成了铜锁的nginx,标准ssl反代国密,或者国密反代标准ssl,都访问不了,是什么原因?
- 谁在使用铜锁 Who is Using Tongsuo HOT 3
- 如何获取 peer enc_certificate 跟 peer sign_certificate?
- 在openEuler-22.03-LTS-loongarch64下编译和安装铜锁成功,可是执行tongsuo命令失败 HOT 1
- openssl 3.0相比1.1.1.有严重的性能问题,tongsuo基于3.0,会有这个问题吗? HOT 1
- 客户端代码使用ECDHE-SM2-WITH-SM4-SM3报错 HOT 1
- 临时目录编译不支持--symbol-prefix BABA_
- 请问铜锁支持国密双证书或单证书的 DTLS 吗?
- 请问8.4.0版本如何启用旧的算法支持?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tongsuo.