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

Unified Diff: webrtc/p2p/base/faketransportcontroller.h

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
Index: webrtc/p2p/base/faketransportcontroller.h
diff --git a/webrtc/p2p/base/faketransportcontroller.h b/webrtc/p2p/base/faketransportcontroller.h
index 251a0c681aa448bee449937bd43f7ae0f1d1a508..5fd0495f3595bd29b5b0d1de2cdc1ec9620404bd 100644
--- a/webrtc/p2p/base/faketransportcontroller.h
+++ b/webrtc/p2p/base/faketransportcontroller.h
@@ -311,6 +311,13 @@ class FakeTransportChannel : public TransportChannelImpl,
return ssl_max_version_;
}
+ void set_enable_gcm_ciphers(bool enable) {
+ enable_gcm_ciphers_ = enable;
+ }
+ bool IsEnableGcmCiphers() const override {
+ return enable_gcm_ciphers_;
+ }
+
private:
enum State { STATE_INIT, STATE_CONNECTING, STATE_CONNECTED };
Transport* transport_;
@@ -333,6 +340,7 @@ class FakeTransportChannel : public TransportChannelImpl,
std::string remote_ice_pwd_;
IceMode remote_ice_mode_ = ICEMODE_FULL;
rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_10;
+ bool enable_gcm_ciphers_ = false;
rtc::SSLFingerprint dtls_fingerprint_;
rtc::SSLRole ssl_role_ = rtc::SSL_CLIENT;
size_t connection_count_ = 0;
@@ -405,6 +413,16 @@ class FakeTransport : public Transport {
rtc::SSLProtocolVersion ssl_max_protocol_version() const {
return ssl_max_version_;
}
+ bool SetEnableGcmCiphers(bool enable) override {
+ enable_gcm_ciphers_ = enable;
+ for (const auto& kv : channels_) {
+ kv.second->set_enable_gcm_ciphers(enable_gcm_ciphers_);
+ }
+ return true;
+ }
+ bool enable_gcm_ciphers() const {
+ return enable_gcm_ciphers_;
+ }
using Transport::local_description;
using Transport::remote_description;
@@ -417,6 +435,7 @@ class FakeTransport : public Transport {
FakeTransportChannel* channel =
new FakeTransportChannel(this, name(), component);
channel->set_ssl_max_protocol_version(ssl_max_version_);
+ channel->set_enable_gcm_ciphers(enable_gcm_ciphers_);
channel->SetAsync(async_);
SetChannelDestination(component, channel);
channels_[component] = channel;
@@ -454,6 +473,7 @@ class FakeTransport : public Transport {
bool async_ = false;
rtc::scoped_refptr<rtc::RTCCertificate> certificate_;
rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_10;
+ bool enable_gcm_ciphers_ = false;
};
// Fake TransportController class, which can be passed into a BaseChannel object

Powered by Google App Engine
This is Rietveld 408576698