Promotoing webrtc::CryptoOptions to RTCConfiguration.

With the expanding use cases for webrtc::CryptoOptions it makes more sense for
it to be be available per peer connection instead of only as a factory option.

To support backwards compatability for now this code will support the factory
method of setting crypto options by default. However it will completely
overwrite these settings if an RTCConfiguration.crypto_options is provided.

Got LGTM offline from Sami, adding him to TBR if he has any further comments.

TBR=sakal@webrtc.org

Bug: webrtc:9891
Change-Id: I86914cab69284ad82afd7285fd84ec5f4f2c4986
Reviewed-on: https://webrtc-review.googlesource.com/c/107029
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25375}
This commit is contained in:
Benjamin Wright
2018-10-25 10:16:44 -07:00
committed by Commit Bot
parent 78410ad413
commit 8c27ccac75
21 changed files with 581 additions and 10 deletions

View File

@ -123,6 +123,9 @@ public class PeerConnectionFactory {
public boolean disableEncryption;
public boolean disableNetworkMonitor;
// TODO(webrtc:9891) - The below crypto options are deprecated. Please use
// RTCConfiguration to set these options instead. They will be removed in
// a future release.
/**
* If set to true, the (potentially insecure) crypto cipher SRTP_AES128_CM_SHA1_32
* will be included in the list of supported ciphers during negotiation. It will only
@ -158,16 +161,19 @@ public class PeerConnectionFactory {
return disableNetworkMonitor;
}
@Deprecated
@CalledByNative("Options")
boolean getEnableAes128Sha1_32CryptoCipher() {
return enableAes128Sha1_32CryptoCipher;
}
@Deprecated
@CalledByNative("Options")
boolean getEnableGcmCryptoSuites() {
return enableGcmCryptoSuites;
}
@Deprecated
@CalledByNative("Options")
boolean getRequireFrameEncryption() {
return requireFrameEncryption;