已合并
1. Add DTLCP over sctp 2. Use IS_SUPPORT_DATAGRAM to decide whether to go to the DTLS or TLS branch during handshakes #152
这好吗创建于 2025年2月19日
1. Add DTLCP over sctp 2. Use IS_SUPPORT_DATAGRAM to decide whether to go to the DTLS or TLS branch during handshakes #152
已合并
这好吗创建于 2025年2月19日
这好吗
这好吗
2025年2月19日
  1. Add DTLCP over sctp
  2. Use IS_SUPPORT_DATAGRAM to refactor the codes that decides whether to go to the DTLS or TLS branch during handshakes
likedislike
Pull Request已成功合入, 合并人@dumb
(感谢 这好吗 的贡献)
这好吗这好吗
2025年2月19日 创建了 pull request,commit b42182c2
此处折叠了5条事件消息 查看更多
osespark_infraosespark_infra成员
2025年2月19日 删除了label:hold:claunsigned
baoyi84930成员2025年2月21日进行代码检视1
config/macro_config/hitls_config_layer_tls.h
@@ -41,3 +44,4 @@
4144 #endif
4245#endif
4346 
47+#if defined(HITLS_TLS_PROTO_DTLCP11)
baoyi849302025年2月21日评论:

这里感觉有点奇怪,版本之间存在这种依赖关系,考虑下是否可以用内部宏处理公共代码,此处用版本来推导内部宏的形式。

likedislike
baoyi84930成员2025年2月21日进行代码检视3
tls/feature/sni/src/sni.c
已过期
@@ -50,3 +50,3 @@
5050 /* During or after handshake */
5151 /* TLS protocol version < TLS1.3 session resumption */
52- if ((version < HITLS_VERSION_TLS13 || version == HITLS_VERSION_DTLS12) && isResume && ctx->session != NULL) {
52+ if ((version < HITLS_VERSION_TLS13 || IS_SUPPORT_DATAGRAM(ctx->config.tlsConfig.originVersionMask)) &&
baoyi849302025年2月21日评论:

这里我看注释写的是 版本小于tls1.3 , 这一用dtls判断会给以后埋坑,如果以后支持了dtls1.3,这里就有问题

likedislike
System
系统消息系统
2025年2月24日 评论:

changed this line on 819acf0e view diff detail

这好吗
这好吗
2025年2月24日 评论:

这里是在改其他HITLS_VERSION_DTLS12影响分支的地方时不小心改到了,下面
tls/handshake/pack/src/pack_server_key_exchange.c文件中的情况相同。已恢复,除此之外tls/record/src/rec_read.c:258作了不同的更改:

@@ -255,7 +255,7 @@ int32_t DtlsCheckVersionField(const TLS_Ctx *ctx, uint16_t version, uint8_t type
     /* Tolerate alerts with non-negotiated version. For example, after the server sends server hello, the client
      * replies with an earlier version alert */
     if (ctx->negotiatedInfo.version == 0u || type == (uint8_t)REC_TYPE_ALERT) {
-        if ((version != HITLS_VERSION_DTLS10) && (version != HITLS_VERSION_DTLS12)) {
+        if ((version != HITLS_VERSION_DTLS10) && (version != HITLS_VERSION_DTLS12) && (version != HITL
S_VERSION_TLCP11)) {
             BSL_ERR_PUSH_ERROR(HITLS_REC_INVALID_PROTOCOL_VERSION);
baoyi84930成员2025年2月21日进行代码检视1
tls/handshake/pack/src/pack.c
@@ -218,6 +218,11 @@ int32_t HS_PackMsg(TLS_Ctx *ctx, HS_MsgType type, uint8_t *buf, uint32_t bufLen,
218218 case HITLS_VERSION_TLS12:
219219#ifdef HITLS_TLS_PROTO_TLCP11
220220 case HITLS_VERSION_TLCP11:
221+#if defined(HITLS_TLS_PROTO_DTLCP11)
baoyi849302025年2月21日评论:

emmm 感觉这两个版本号一致,我们不能用不同的宏来表示,这样会引起误导,我们应该用一个联合的宏来表示,类似这种 HITLS_VERSION_TLCP11_DTLCP11 ?

likedislike
Lliwei3013成员
2025年2月21日 添加了label:br:maintriaged:feat
baoyi84930成员2025年2月21日进行代码检视2
tls/handshake/pack/src/pack_server_key_exchange.c
已过期
@@ -131,3 +131,3 @@
131131 dataLen += sizeof(uint16_t) + signatureLen;
132132 /* A signature type needs to be added to TLS1.2/DTLS. The signature type does not need to be transferred */
133- if (ctx->negotiatedInfo.version == HITLS_VERSION_TLS12 || ctx->negotiatedInfo.version == HITLS_VERSION_DTLS12) {
133+ if (ctx->negotiatedInfo.version == HITLS_VERSION_TLS12 ||
baoyi849302025年2月21日评论:

这里的逻辑再斟酌下,看起来跟是否是数据报没关系,单纯的是tls1.2 和dtls1.2的逻辑

likedislike
System
系统消息系统
2025年2月24日 评论:

changed this line on 819acf0e view diff detail

baoyi84930成员2025年2月21日进行代码检视2
tls/handshake/pack/src/pack_server_key_exchange.c
已过期
@@ -361,3 +362,2 @@
361362#if defined(HITLS_TLS_PROTO_TLS12) || defined(HITLS_TLS_PROTO_DTLS12)
362- if (ctx->negotiatedInfo.version == HITLS_VERSION_TLS12 || ctx->negotiatedInfo.version == HITLS_VERSION_DTLS12) {
363- dataLen += sizeof(uint16_t); // TLS1.2/DTLS needs to add a signature type
363+ if (ctx->negotiatedInfo.version == HITLS_VERSION_TLS12 ||
baoyi849302025年2月21日评论:

同上

likedislike
System
系统消息系统
2025年2月24日 评论:

changed this line on 819acf0e view diff detail

这好吗这好吗
2025年2月24日 update merge request[project id: 4195561, iid: 152, commit_id: 229efe70cadfad7e4815365ddfb22392137d4d84] virtual merging success
此处折叠了20条事件消息 查看更多
tlhcdtlhcd成员
2025年4月25日 关联了issue:GM/T 0128-2023数据报传输层密码协议规范实现