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}
diff --git a/sdk/objc/Framework/Classes/PeerConnection/RTCConfiguration.mm b/sdk/objc/Framework/Classes/PeerConnection/RTCConfiguration.mm
index e318a9f..4bd0450 100644
--- a/sdk/objc/Framework/Classes/PeerConnection/RTCConfiguration.mm
+++ b/sdk/objc/Framework/Classes/PeerConnection/RTCConfiguration.mm
@@ -45,6 +45,7 @@
@synthesize iceRegatherIntervalRange = _iceRegatherIntervalRange;
@synthesize sdpSemantics = _sdpSemantics;
@synthesize turnCustomizer = _turnCustomizer;
+@synthesize activeResetSrtpParams = _activeResetSrtpParams;
- (instancetype)init {
// Copy defaults.
@@ -99,6 +100,7 @@
}
_sdpSemantics = [[self class] sdpSemanticsForNativeSdpSemantics:config.sdp_semantics];
_turnCustomizer = config.turn_customizer;
+ _activeResetSrtpParams = config.active_reset_srtp_params;
}
return self;
}
@@ -106,7 +108,7 @@
- (NSString *)description {
static NSString *formatString =
@"RTCConfiguration: "
- @"{\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%@\n%@\n%d\n%d\n}\n";
+ @"{\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%@\n%@\n%d\n%d\n%d\n}\n";
return [NSString
stringWithFormat:formatString,
@@ -128,7 +130,8 @@
_iceCheckMinInterval,
_iceRegatherIntervalRange,
_disableLinkLocalNetworks,
- _maxIPv6Networks];
+ _maxIPv6Networks,
+ _activeResetSrtpParams];
}
#pragma mark - Private
@@ -194,6 +197,7 @@
if (_turnCustomizer) {
nativeConfig->turn_customizer = _turnCustomizer;
}
+ nativeConfig->active_reset_srtp_params = _activeResetSrtpParams ? true : false;
return nativeConfig.release();
}