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

Unified Diff: webrtc/base/opensslstreamadapter.cc

Issue 1550773002: Update with new default boringssl no-aes cipher suites. Re-enable tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Support old boringssl versions 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
« no previous file with comments | « talk/app/webrtc/peerconnection_unittest.cc ('k') | webrtc/base/sslstreamadapter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/opensslstreamadapter.cc
diff --git a/webrtc/base/opensslstreamadapter.cc b/webrtc/base/opensslstreamadapter.cc
index 270faa0809f42013c01aeb35854d7c98b3b9cc1f..f445dd4140bb95e43575e7df3a649c467035bea8 100644
--- a/webrtc/base/opensslstreamadapter.cc
+++ b/webrtc/base/opensslstreamadapter.cc
@@ -160,12 +160,27 @@ static int kDefaultSslCipher12 =
static int kDefaultSslEcCipher12 =
static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256);
// Fallback cipher for DTLS 1.2 if hardware-accelerated AES-GCM is unavailable.
-// TODO(davidben): Switch to the standardized CHACHA20_POLY1305 variant when
-// available.
+
+#ifdef TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
davidben_webrtc 2016/01/06 04:04:44 Do you actually need this? Surely by now DEPS roll
torbjorng (webrtc) 2016/01/13 13:16:47 OK. I added this to for the benefit of third parti
davidben_webrtc 2016/01/13 20:42:53 Pre-installed versions of BoringSSL are explicitly
torbjorng (webrtc) 2016/01/14 14:27:09 :-) I cannot take credit for those tests, unfortu
+ // This was added in boringssl 13414b3a048f17074253d23d03c0ab97c49b54e2,
+ // changing the fallback. For now, support old boringssl versions.
+static int kDefaultSslCipher12NoAesGcm =
+ static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256);
davidben_webrtc 2016/01/06 04:04:44 So, this is fine, but it seems poor that you'd nee
torbjorng (webrtc) 2016/01/13 13:16:47 We might want to clean this up at some point, as w
davidben_webrtc 2016/01/13 20:42:53 Yeah, I would definitely ask that you change this,
torbjorng (webrtc) 2016/01/14 14:27:09 I suppose somebody added these tests as a test of
+#else
static int kDefaultSslCipher12NoAesGcm =
static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_CHACHA20_POLY1305_OLD);
+#endif
+
+#ifdef TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
+ // This was added in boringssl 13414b3a048f17074253d23d03c0ab97c49b54e2,
+ // changing the fallback. For now, support old boringssl versions.
+static int kDefaultSslEcCipher12NoAesGcm =
+ static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256);
+#else
static int kDefaultSslEcCipher12NoAesGcm =
static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_CHACHA20_POLY1305_OLD);
+#endif
+
#else // !OPENSSL_IS_BORINGSSL
// OpenSSL sorts differently than BoringSSL, so the default cipher doesn't
// change between TLS 1.0 and TLS 1.2 with the current setup.
@@ -173,7 +188,7 @@ static int kDefaultSslCipher12 =
static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA);
static int kDefaultSslEcCipher12 =
static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA);
-#endif
+#endif // OPENSSL_IS_BORINGSSL
#if defined(_MSC_VER)
#pragma warning(pop)
« no previous file with comments | « talk/app/webrtc/peerconnection_unittest.cc ('k') | webrtc/base/sslstreamadapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698