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

Unified Diff: webrtc/base/opensslstreamadapter.cc

Issue 1823213002: Don't override curve preferences in BoringSSL. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: rebase Created 4 years, 9 months 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 | « no previous file | no next file » | 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 44f1b718f552b8b00e30b3a320fa595500c50189..052e54df9f33c840cf5ddf1e5f4e6e29eaf68c82 100644
--- a/webrtc/base/opensslstreamadapter.cc
+++ b/webrtc/base/opensslstreamadapter.cc
@@ -783,15 +783,18 @@ int OpenSSLStreamAdapter::BeginSSL() {
SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE |
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
- // Specify an ECDH group for ECDHE ciphers, otherwise they cannot be
- // negotiated when acting as the server. Use NIST's P-256 which is commonly
- // supported.
+#if !defined(OPENSSL_IS_BORINGSSL)
+ // Specify an ECDH group for ECDHE ciphers, otherwise OpenSSL cannot
+ // negotiate them when acting as the server. Use NIST's P-256 which is
+ // commonly supported. BoringSSL doesn't need explicit configuration and has
+ // a reasonable default set.
EC_KEY* ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
if (ecdh == NULL)
return -1;
SSL_set_options(ssl_, SSL_OP_SINGLE_ECDH_USE);
SSL_set_tmp_ecdh(ssl_, ecdh);
EC_KEY_free(ecdh);
+#endif
// Do the connect
return ContinueSSL();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698