| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 static int kDefaultSslCipher10 = | 153 static int kDefaultSslCipher10 = |
| 154 static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA); | 154 static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA); |
| 155 static int kDefaultSslEcCipher10 = | 155 static int kDefaultSslEcCipher10 = |
| 156 static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA); | 156 static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA); |
| 157 #ifdef OPENSSL_IS_BORINGSSL | 157 #ifdef OPENSSL_IS_BORINGSSL |
| 158 static int kDefaultSslCipher12 = | 158 static int kDefaultSslCipher12 = |
| 159 static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256); | 159 static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256); |
| 160 static int kDefaultSslEcCipher12 = | 160 static int kDefaultSslEcCipher12 = |
| 161 static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256); | 161 static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256); |
| 162 // Fallback cipher for DTLS 1.2 if hardware-accelerated AES-GCM is unavailable. | 162 // Fallback cipher for DTLS 1.2 if hardware-accelerated AES-GCM is unavailable. |
| 163 // TODO(davidben): Switch to the standardized CHACHA20_POLY1305 variant when |
| 164 // available. |
| 163 static int kDefaultSslCipher12NoAesGcm = | 165 static int kDefaultSslCipher12NoAesGcm = |
| 164 static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256); | 166 static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_CHACHA20_POLY1305_OLD); |
| 165 static int kDefaultSslEcCipher12NoAesGcm = | 167 static int kDefaultSslEcCipher12NoAesGcm = |
| 166 static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256); | 168 static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_CHACHA20_POLY1305_OLD); |
| 167 #else // !OPENSSL_IS_BORINGSSL | 169 #else // !OPENSSL_IS_BORINGSSL |
| 168 // OpenSSL sorts differently than BoringSSL, so the default cipher doesn't | 170 // OpenSSL sorts differently than BoringSSL, so the default cipher doesn't |
| 169 // change between TLS 1.0 and TLS 1.2 with the current setup. | 171 // change between TLS 1.0 and TLS 1.2 with the current setup. |
| 170 static int kDefaultSslCipher12 = | 172 static int kDefaultSslCipher12 = |
| 171 static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA); | 173 static_cast<uint16_t>(TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA); |
| 172 static int kDefaultSslEcCipher12 = | 174 static int kDefaultSslEcCipher12 = |
| 173 static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA); | 175 static_cast<uint16_t>(TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA); |
| 174 #endif // OPENSSL_IS_BORINGSSL | 176 #endif |
| 175 | 177 |
| 176 #if defined(_MSC_VER) | 178 #if defined(_MSC_VER) |
| 177 #pragma warning(pop) | 179 #pragma warning(pop) |
| 178 #endif // defined(_MSC_VER) | 180 #endif // defined(_MSC_VER) |
| 179 | 181 |
| 180 ////////////////////////////////////////////////////////////////////// | 182 ////////////////////////////////////////////////////////////////////// |
| 181 // StreamBIO | 183 // StreamBIO |
| 182 ////////////////////////////////////////////////////////////////////// | 184 ////////////////////////////////////////////////////////////////////// |
| 183 | 185 |
| 184 static int stream_write(BIO* h, const char* buf, int num); | 186 static int stream_write(BIO* h, const char* buf, int num); |
| (...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 } | 1163 } |
| 1162 } else { | 1164 } else { |
| 1163 RTC_NOTREACHED(); | 1165 RTC_NOTREACHED(); |
| 1164 return kDefaultSslEcCipher12; | 1166 return kDefaultSslEcCipher12; |
| 1165 } | 1167 } |
| 1166 } | 1168 } |
| 1167 | 1169 |
| 1168 } // namespace rtc | 1170 } // namespace rtc |
| 1169 | 1171 |
| 1170 #endif // HAVE_OPENSSL_SSL_H | 1172 #endif // HAVE_OPENSSL_SSL_H |
| OLD | NEW |