curl support TLCP using TASSL

TLCP

传输层密码协议TLCP 对应 TLS协议, 在GB/T 38636-2020规范中定义。支持国密sm2, sm3, sm4密钥套件。增加加密证书, 6.4.5.3章节中提到 选择ECC, ECDHE算法,密钥交换算法使用用加密证书公钥。

https://blog.csdn.net/shenshaojun/article/details/114576162

这里对密钥体系进行了说明, 目前没看到标准里介绍,加密证书CA生成,并拥有私钥。这样的涉及对于信息保密性要依赖CA机构?

 

CURL

curl工具目前还不支持TLCP,一般需要进行简单修改。 目前支持国密库:

  • GMSSL
  • Tongsuo 铜锁
  • 江南天安TASSL
  • TencentKonaSMSuite

curl支持TLCP:

  • GMSSL 开源版本 : https://github.com/pengtianabc/curl-gm
  • Tongsuo : https://github.com/Tongsuo-Project/curl

 

CURL compile using TASSL

具体实现:https://github.com/weida/curl

需要注意新版本curl的参数使用二分查找,参数需要自己排序

"src/tool_getparam.c" 
/* this array MUST be alphasorted based on the 'lname' */
static const struct LongShort aliases[]= {
...

目前测试环境仅有linux版本,只提了个linux patch。

 

参考及引用:

https://zhuanlan.zhihu.com/p/564452283

https://www.cnblogs.com/anding/p/17627553.html

图片from陳丁光

Comments are closed.