DTLS概述

Overview

概述

WebRTC uses DTLS in two ways:

WebRTC以两种方式使用DTLS:

  • to negotiate keys for SRTP encryption using DTLS-SRTP
  • ​使用DTLS-SRTP协商SRTP加密的密钥
  • as a transport for SCTP which is used by the Datachannel API
  • 作为数据通道API使用的SCTP的传输

The W3C WebRTC API represents this as the DtlsTransport.

​W3C WebRTC API将其表示为DtlsTransport。

The DTLS handshake happens after the ICE transport becomes writable and has found a valid pair. It results in a set of keys being derived for DTLS-SRTP as well as a fingerprint of the remote certificate which is compared to the one given in the SDP a=fingerprint: line.

DTLS握手发生在ICE传输变为可写并找到有效对之后。它导致为DTLS-SRTP导出一组密钥,以及将远程证书的指纹与SDP a=fingerprint:行中给出的指纹进行比较。

This documentation provides an overview of how DTLS is implemented, i.e how the following classes interact.

本文档概述了DTLS是如何实现的,即以下类是如何交互的。

webrtc::DtlsTransport

The webrtc::DtlsTransport class is a wrapper around the cricket::DtlsTransportInternal and allows registering observers implementing the webrtc::DtlsTransportObserverInterface. The webrtc::DtlsTransportObserverInterface will provide updates to the observers, passing around a snapshot of the transports state such as the connection state, the remote certificate(s) and the SRTP ciphers as DtlsTransportInformation.

​webrtc::DtlsTransport类是 cricket::DtlsTransportInternal的包装器,允许注册实现webrtc::DtlsTransportObserverInterface的观察者。webrtc::DtlsTransportObserverInterface将向观察者提供更新,将传输状态的快照(如连接状态、远程证书和SRTP密码)作为DtlsTtransportInformation传递。

cricket::DtlsTransportInternal

The cricket::DtlsTransportInternal class is an interface. Its implementation is cricket::DtlsTransport. The cricket::DtlsTransport sends and receives network packets via an ICE transport. It also demultiplexes DTLS packets and SRTP packets according to the scheme described in RFC 5764.

​cricket::DtlsTransportInternal类是一个接口。它的实现是cricket::DtlsTransport。cricket::DtlsTransport通过ICE传输发送和接收网络数据包。它还根据RFC 5764中描述的方案对DTLS分组和SRTP分组进行解复用。

webrtc::DtlsSrtpTranport

The webrtc::DtlsSrtpTransport class is responsіble for extracting the SRTP keys after the DTLS handshake as well as protection and unprotection of SRTP packets via its cricket::SrtpSession.

​webrtc::DtlsSrtpTransport类负责在DTLS握手后提取SRTP密钥,以及通过其cricket::SrtpSession保护和取消保护SRTP数据包。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值