使用 Californium Scandium 核心的 DTLS 客户端和服务器之间的连接 ID 交换相关查询

Query related to Connection Id exchange between DTLS Client & Server using Californium Scandium core

我正在使用 Californium-Scandium 演示应用程序项目探索 DTLS 1.2。 似乎是钪核README.md supports the latest draft of Connection Identifiers for DTLS 1.2。 根据 Connection Identifiers for DTLS 1.2,如果客户端和服务器想要基于连接 ID 进行对话,则 CID 交换发生在客户端和服务器之间。 当我 运行 Scandium Server & Scandium Client, I am not able to see the exchange of CID happening between the client and the server. Though I can see the Connection Id generation on Client as well Server side of DTLS. I have added the logger in the Record.java 的演示应用程序但记录器中的连接 ID 始终为 null 时。 我的问题是DTLS Server和DTLS client之间的CID交换逻辑是否在scandium-core API中实现?如果是,请帮我找出用于此的类。

对于版本 2.6.0,ExampleDTLSClient 和 ExampleDTLSServer 都不是“开箱即用”的,并且启用了 CID(但我会为 3.0 更改它:-))。

如果您想看到“开箱即用”,请使用“cf-secure”演示。以“CID:0”启动客户端以“支持 CID”,以“CID:6”启动服务器以使用 6 字节 CID。

要为 ExampleDTLSClient 和 ExampleDTLSServer 启用 CID,请将 a

添加到 DtlsConfigurationBuilder
builder.setConnectionIdGenerator(new SingleNodeConnectionIdGenerator(cidLength));

客户端使用 cidLength 0(支持),服务器使用 6(使用 6 个字节)。