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

Unified Diff: webrtc/p2p/base/dtlstransportchannel.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
Index: webrtc/p2p/base/dtlstransportchannel.cc
diff --git a/webrtc/p2p/base/dtlstransportchannel.cc b/webrtc/p2p/base/dtlstransportchannel.cc
index 95014f9a6250c534e3e08b8a8882384e308dd17e..6695da406ab152c0242864e185f8b5c9abc28fe8 100644
--- a/webrtc/p2p/base/dtlstransportchannel.cc
+++ b/webrtc/p2p/base/dtlstransportchannel.cc
@@ -95,7 +95,8 @@ DtlsTransportChannelWrapper::DtlsTransportChannelWrapper(
channel_(channel),
downward_(NULL),
ssl_role_(rtc::SSL_CLIENT),
- ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) {
+ ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10),
+ enable_gcm_ciphers_(false) {
channel_->SignalWritableState.connect(this,
&DtlsTransportChannelWrapper::OnWritableState);
channel_->SignalReadPacket.connect(this,
@@ -167,6 +168,21 @@ bool DtlsTransportChannelWrapper::SetSslMaxProtocolVersion(
return true;
}
+bool DtlsTransportChannelWrapper::SetEnableGcmCiphers(bool enable) {
+ if (dtls_active_) {
+ LOG(LS_ERROR) << "Not changing enabled GCM ciphers "
+ << "while DTLS is negotiating";
+ return false;
+ }
+
+ enable_gcm_ciphers_ = enable;
+ return true;
+}
+
+bool DtlsTransportChannelWrapper::IsEnableGcmCiphers() const {
+ return enable_gcm_ciphers_;
+}
+
bool DtlsTransportChannelWrapper::SetSslRole(rtc::SSLRole role) {
if (dtls_state() == DTLS_TRANSPORT_CONNECTED) {
if (ssl_role_ != role) {

Powered by Google App Engine
This is Rietveld 408576698