summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbauch <jbauch@webrtc.org>2015-06-02 07:00:07 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-02 14:00:43 +0000
commit71007708c7365e46027db20a4387b18e96ed5d44 (patch)
tree068b0a813b79dd28d101fc350cb7d74872e772e8
parent8c95dcf5164de33fd42d29567adb24655b4c2ab0 (diff)
downloadchromium_src-71007708c7365e46027db20a4387b18e96ed5d44.zip
chromium_src-71007708c7365e46027db20a4387b18e96ed5d44.tar.gz
chromium_src-71007708c7365e46027db20a4387b18e96ed5d44.tar.bz2
Add commandline switch to enable DTLS 1.2 for WebRTC.
This CL adds the commandline switch "--enable-webrtc-dtls12" to enable negotiation of DTLS 1.2 for WebRTC peerconnections. BUG=428343 Review URL: https://codereview.chromium.org/1157093007 Cr-Commit-Position: refs/heads/master@{#332381}
-rw-r--r--AUTHORS1
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/about_flags.cc9
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc1
-rw-r--r--content/public/common/content_switches.cc3
-rw-r--r--content/public/common/content_switches.h1
-rw-r--r--content/renderer/media/webrtc/peer_connection_dependency_factory.cc2
-rw-r--r--tools/metrics/histograms/histograms.xml1
8 files changed, 24 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 481689a..1a42189 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -257,6 +257,7 @@ Jinho Bang <jinho.bang@samsung.com>
Jinwoo Song <jinwoo7.song@samsung.com>
Jitendra Kumar Sahoo <jitendra.ks@samsung.com>
Joachim Bauch <mail@joachim-bauch.de>
+Joachim Bauch <jbauch@webrtc.org>
Joe Knoll <joe.knoll@workday.com>
Joe Thomas <mhx348@motorola.com>
Joel Stanley <joel@jms.id.au>
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 231050b..b0e3092 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5920,6 +5920,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_DISABLE_WEBRTC_HW_ENCODING_DESCRIPTION" desc="Description of chrome:flags option to turn off WebRTC hardware video encoding support.">
This option disables support in WebRTC for encoding video streams using platform hardware.
</message>
+ <message name="IDS_FLAGS_ENABLE_WEBRTC_DTLS12_NAME" desc="Name of chrome:flags option to enable DTLS 1.2 for WebRTC">
+ Enable negotiation with DTLS 1.2 for WebRTC.
+ </message>
+ <message name="IDS_FLAGS_ENABLE_WEBRTC_DTLS12_DESCRIPTION" desc="Description of chrome:flags option to enable DTLS 1.2 for WebRTC">
+ When enabled, WebRTC will try to negotiate DTLS 1.2.
+ </message>
<message name="IDS_FLAGS_ENABLE_WEBRTC_STUN_ORIGIN_NAME" desc="Name of chrome:flags option to turn on Origin header for WebRTC STUN messages">
Enable support for WebRTC Stun origin header.
</message>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index dc8f732..80122fd 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2380,6 +2380,15 @@ const Experiment kExperiments[] = {
kOsAll,
SINGLE_VALUE_TYPE(switches::kEmphasizeTitlesInOmniboxDropdown)
},
+#if defined(ENABLE_WEBRTC)
+ {
+ "enable-webrtc-dtls12",
+ IDS_FLAGS_ENABLE_WEBRTC_DTLS12_NAME,
+ IDS_FLAGS_ENABLE_WEBRTC_DTLS12_DESCRIPTION,
+ kOsAll,
+ SINGLE_VALUE_TYPE(switches::kEnableWebRtcDtls12)
+ },
+#endif
// NOTE: Adding new command-line switches requires adding corresponding
// entries to enum "LoginCustomFlags" in histograms.xml. See note in
// histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 1417f0f..8f90764 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1364,6 +1364,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
#if defined(ENABLE_WEBRTC)
switches::kDisableWebRtcHWDecoding,
switches::kDisableWebRtcHWEncoding,
+ switches::kEnableWebRtcDtls12,
switches::kEnableWebRtcHWH264Encoding,
switches::kEnableWebRtcStunOrigin,
switches::kWebRtcMaxCaptureFramerate,
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 2dbba59..77e501d 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -904,6 +904,9 @@ const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
// Disables HW encode acceleration for WebRTC.
const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
+// Enables negotiation of DTLS 1.2 for WebRTC.
+const char kEnableWebRtcDtls12[] = "enable-webrtc-dtls12";
+
// Enables H264 HW encode acceleration for WebRTC.
const char kEnableWebRtcHWH264Encoding[] = "enable-webrtc-hw-h264-encoding";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 0b192f6..c86bff1 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -251,6 +251,7 @@ CONTENT_EXPORT extern const char kZygoteProcess[];
CONTENT_EXPORT extern const char kDisableWebRtcHWDecoding[];
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
CONTENT_EXPORT extern const char kDisableWebRtcHWEncoding[];
+CONTENT_EXPORT extern const char kEnableWebRtcDtls12[];
CONTENT_EXPORT extern const char kEnableWebRtcHWH264Encoding[];
CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
extern const char kWebRtcMaxCaptureFramerate[];
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index 35f5a31..dad2937 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -387,6 +387,8 @@ void PeerConnectionDependencyFactory::InitializeSignalingThread(
factory_options.disable_sctp_data_channels = false;
factory_options.disable_encryption =
cmd_line->HasSwitch(switches::kDisableWebRtcEncryption);
+ if (cmd_line->HasSwitch(switches::kEnableWebRtcDtls12))
+ factory_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12;
pc_factory_->SetOptions(factory_options);
event->Signal();
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 82381cc..785f32e 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -57574,6 +57574,7 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="-2137755780" label="enable-reader-mode-toolbar-icon"/>
<int value="-2132591642" label="enable-input-view"/>
<int value="-2119827860" label="ash-disable-maximize-mode-window-backdrop"/>
+ <int value="-2119530966" label="enable-webrtc-dtls12"/>
<int value="-2117201726" label="disable-gpu-rasterization"/>
<int value="-2114831248" label="disable-new-ntp"/>
<int value="-2099035488" label="enable-data-reduction-proxy-bypass-warning"/>