google-chrome - WebRTC ICE-Stun 消息完整性属性

标签 google-chrome webrtc hmac stun hmacsha1

验证来自 Chrome 的 STUN 绑定(bind)请求的 MESSAGE-INTEGRITY 属性时,我该如何使用 HMAC-SHA1 key ? (chrome 处于 ICE-CONTROLLING 角色,因为 SDP 提供来自 ICE-LITE 对等方)

RFC-5245状态:

To compute the message integrity for the check, the agent uses the remote username fragment and password learned from the SDP from its peer. The local username fragment is known directly by the agent for its own candidate.

但它没有说明代理如何将这些连接起来形成 HMAC SHA1 key

我尝试了不同的ice-username:ice-password组合来形成 key ,但似乎没有一个能够生成与来自chrome的绑定(bind)请求中的消息完整性属性相同的哈希值。

有人知道 HMAC key 是如何形成的吗?

最佳答案

您的请求将使用您本地的ice-pwd进行签名,并且响应也必须使用它进行签名(如ħere所述)。

参见RFC 5389关于如何计算哈希值。

关于google-chrome - WebRTC ICE-Stun 消息完整性属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58541034/

相关文章:

java - java中的散列json

ColdFusion hmac() 使用 toBase64 和 binaryEncode 返回不同的值

ios - 阻止 Chrome for iOS 打开 "Open in New Tab .. Copy Link URL"弹出窗口

javascript - Chrome URL 多个空格问题

google-chrome - 允许通过 chromedriver 在 Chrome 71 中运行 Flash 内容

google-chrome - ERR_SSL_VERSION_OR_CIPHER_MISMATCH(错误)

ios - 无法使用 WebRTC 渲染远程视频

webrtc - 回退到 TURN 的预期连接百分比可能是多少?

ios - RTCPeerConnectionFactory.peerConnectionWithConfiguration 导致 IOS 模拟器崩溃

Node.js - 即使 req.body 不为空,POST 中的 req.on ("data"也不会被调用