Add a flag to actively reset the SRTP parameters
Add a new flag to RtcConfiguration. By setting that flag to true, the SRTP parameters will be reset whenever the DTLS transports are reset after every offer/answer negotiation. The flag is added to Android and Objc wrapper as well. This should only be used as a workaround for the linked bug, if the application knows that the other party is affected (for instance, using a version number). TBR=sakal@webrtc.org, denicija@webrtc.org Bug: chromium:835958 Change-Id: I6db025e1c69bf83e1b1908f7df4627430db9920c Reviewed-on: https://webrtc-review.googlesource.com/83101 Commit-Queue: Zhi Huang <zhihuang@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23587}
This commit is contained in:
@ -457,6 +457,10 @@ public class PeerConnection {
|
||||
// This is an optional wrapper for the C++ webrtc::TurnCustomizer.
|
||||
@Nullable public TurnCustomizer turnCustomizer;
|
||||
|
||||
// Actively reset the SRTP parameters whenever the DTLS transports underneath are reset for
|
||||
// every offer/answer negotiation.This is only intended to be a workaround for crbug.com/835958
|
||||
public boolean activeResetSrtpParams;
|
||||
|
||||
// TODO(deadbeef): Instead of duplicating the defaults here, we should do
|
||||
// something to pick up the defaults from C++. The Objective-C equivalent
|
||||
// of RTCConfiguration does that.
|
||||
@ -495,6 +499,7 @@ public class PeerConnection {
|
||||
enableDtlsSrtp = null;
|
||||
networkPreference = AdapterType.UNKNOWN;
|
||||
sdpSemantics = SdpSemantics.PLAN_B;
|
||||
activeResetSrtpParams = false;
|
||||
}
|
||||
|
||||
@CalledByNative("RTCConfiguration")
|
||||
@ -682,6 +687,11 @@ public class PeerConnection {
|
||||
SdpSemantics getSdpSemantics() {
|
||||
return sdpSemantics;
|
||||
}
|
||||
|
||||
@CalledByNative("RTCConfiguration")
|
||||
boolean getActiveResetSrtpParams() {
|
||||
return activeResetSrtpParams;
|
||||
}
|
||||
};
|
||||
|
||||
private final List<MediaStream> localStreams = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user