webrtc dtls默认采用https证书,如果https证书不存在则随机生成 (#2928)

之前默认随机创建dtls证书,导致每次启动证书都不一致,而Firefox要求同主机的dtls证书必须一致,所以导致每次服务重启,Firefox可能拒绝dtls握手。
并且在集群模式下,如果Firefox接入多个不同集群实例的webrtc服务,也可能导致webrtc dtls握手失败。
This commit is contained in:
夏楚
2023-10-25 17:50:29 +08:00
committed by GitHub
parent 0a19627d86
commit ae662fa083
4 changed files with 18 additions and 59 deletions

View File

@@ -251,7 +251,7 @@ void WebRtcTransport::sendSockData(const char *buf, size_t len, RTC::TransportTu
}
Session::Ptr WebRtcTransport::getSession() const {
auto tuple = _ice_server->GetSelectedTuple(true);
auto tuple = _ice_server ? _ice_server->GetSelectedTuple(true) : nullptr;
return tuple ? static_pointer_cast<Session>(tuple->shared_from_this()) : nullptr;
}