Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Unified Diff: webrtc/p2p/base/transportcontroller.cc

Issue 1528843005: Add support for GCM cipher suites from RFC 7714. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added PeerConnection tests using GCM ciphers, fixed passing of flag through DtlsTransportChannel. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« talk/session/media/srtpfilter.cc ('K') | « webrtc/p2p/base/transportcontroller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportcontroller.cc
diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc
index 22b827a1a5ac2bda29b14296788b15a24824ec33..f32ce38647cdbc0454c739f46ef92dabba480a14 100644
--- a/webrtc/p2p/base/transportcontroller.cc
+++ b/webrtc/p2p/base/transportcontroller.cc
@@ -56,6 +56,11 @@ bool TransportController::SetSslMaxProtocolVersion(
&TransportController::SetSslMaxProtocolVersion_w, this, version));
}
+bool TransportController::SetEnableGcmCiphers(bool enable) {
+ return worker_thread_->Invoke<bool>(rtc::Bind(
+ &TransportController::SetEnableGcmCiphers_w, this, enable));
+}
+
void TransportController::SetIceConfig(const IceConfig& config) {
worker_thread_->Invoke<void>(
rtc::Bind(&TransportController::SetIceConfig_w, this, config));
@@ -283,6 +288,7 @@ Transport* TransportController::GetOrCreateTransport_w(
// The stuff below happens outside of CreateTransport_w so that unit tests
// can override CreateTransport_w to return a different type of transport.
transport->SetSslMaxProtocolVersion(ssl_max_version_);
+ transport->SetEnableGcmCiphers(enable_gcm_ciphers_);
transport->SetIceConfig(ice_config_);
transport->SetIceRole(ice_role_);
transport->SetIceTiebreaker(ice_tiebreaker_);
@@ -327,6 +333,18 @@ bool TransportController::SetSslMaxProtocolVersion_w(
return true;
}
+bool TransportController::SetEnableGcmCiphers_w(bool enable) {
+ RTC_DCHECK(worker_thread_->IsCurrent());
+
+ // GCM ciphers can only be enabled before transports are created.
+ if (!transports_.empty()) {
+ return false;
+ }
+
+ enable_gcm_ciphers_ = enable;
+ return true;
+}
+
void TransportController::SetIceConfig_w(const IceConfig& config) {
RTC_DCHECK(worker_thread_->IsCurrent());
ice_config_ = config;
« talk/session/media/srtpfilter.cc ('K') | « webrtc/p2p/base/transportcontroller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698