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

Unified Diff: webrtc/p2p/base/dtlstransport.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/dtlstransport.h
diff --git a/webrtc/p2p/base/dtlstransport.h b/webrtc/p2p/base/dtlstransport.h
index e9a1ae2adadb6a361defc8443417eb557666ba94..30ccd50e65f43b22a4e71bad25b6c582c7aedb25 100644
--- a/webrtc/p2p/base/dtlstransport.h
+++ b/webrtc/p2p/base/dtlstransport.h
@@ -35,7 +35,8 @@ class DtlsTransport : public Base {
: Base(name, allocator),
certificate_(certificate),
secure_role_(rtc::SSL_CLIENT),
- ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) {}
+ ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10),
+ enable_gcm_ciphers_(false) {}
~DtlsTransport() {
Base::DestroyAllChannels();
@@ -59,6 +60,11 @@ class DtlsTransport : public Base {
return true;
}
+ bool SetEnableGcmCiphers(bool enable) override {
+ enable_gcm_ciphers_ = enable;
+ return true;
+ }
+
bool ApplyLocalTransportDescription(TransportChannelImpl* channel,
std::string* error_desc) override {
rtc::SSLFingerprint* local_fp =
@@ -201,6 +207,7 @@ class DtlsTransport : public Base {
DtlsTransportChannelWrapper* channel = new DtlsTransportChannelWrapper(
this, Base::CreateTransportChannel(component));
channel->SetSslMaxProtocolVersion(ssl_max_version_);
+ channel->SetEnableGcmCiphers(enable_gcm_ciphers_);
return channel;
}
@@ -242,6 +249,7 @@ class DtlsTransport : public Base {
rtc::scoped_refptr<rtc::RTCCertificate> certificate_;
rtc::SSLRole secure_role_;
rtc::SSLProtocolVersion ssl_max_version_;
+ bool enable_gcm_ciphers_;
rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_;
};

Powered by Google App Engine
This is Rietveld 408576698