跳到主要内容

2. Application-Layer Protocol Negotiation (ALPN) ID

2. Application-Layer Protocol Negotiation (ALPN) ID

对于 TLS 上的 CoAP, [RFC8323] 定义了 ALPN ID "coap". 为不同传输层复用相同 ALPN ID 并不可取, 因此本文档为 DTLS 上的 CoAP 注册一个 ALPN ID.

ALPN ID 值长度可变. 对于 DTLS 上的 CoAP, 分配短值 "co", 因为在具有链路层分片的受限网络中, 例如 6LoWPAN [RFC4944], 该短值有助于避免 ClientHello 和 ServerHello 消息分片.

为了发现由 TLS 或 DTLS 保护的 CoAP 服务, 可以分别使用 ALPN ID "coap" 和 "co", 并遵循 [RFC9460] 中描述的一般服务发现行为. 使用其它安全机制的 CoAP 服务发现不在本文档范围内.