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

Side by Side Diff: webrtc/base/opensslstreamadapter.cc

Issue 1329493005: Provide RSA2048 as per RFC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Allow full parameterization of RSA, curve id for ECDSA. Created 5 years, 2 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 unified diff | Download patch
OLDNEW
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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 bool OpenSSLStreamAdapter::HaveExporter() { 1120 bool OpenSSLStreamAdapter::HaveExporter() {
1121 #ifdef HAVE_DTLS_SRTP 1121 #ifdef HAVE_DTLS_SRTP
1122 return true; 1122 return true;
1123 #else 1123 #else
1124 return false; 1124 return false;
1125 #endif 1125 #endif
1126 } 1126 }
1127 1127
1128 std::string OpenSSLStreamAdapter::GetDefaultSslCipher( 1128 std::string OpenSSLStreamAdapter::GetDefaultSslCipher(
1129 SSLProtocolVersion version, 1129 SSLProtocolVersion version,
1130 KeyType key_type) { 1130 KeyTypeFull key_type) {
1131 if (key_type == KT_RSA) { 1131 if (key_type.type() == KT_RSA) {
1132 switch (version) { 1132 switch (version) {
1133 case SSL_PROTOCOL_TLS_10: 1133 case SSL_PROTOCOL_TLS_10:
1134 case SSL_PROTOCOL_TLS_11: 1134 case SSL_PROTOCOL_TLS_11:
1135 return kDefaultSslCipher10; 1135 return kDefaultSslCipher10;
1136 case SSL_PROTOCOL_TLS_12: 1136 case SSL_PROTOCOL_TLS_12:
1137 default: 1137 default:
1138 #ifdef OPENSSL_IS_BORINGSSL 1138 #ifdef OPENSSL_IS_BORINGSSL
1139 if (EVP_has_aes_hardware()) { 1139 if (EVP_has_aes_hardware()) {
1140 return kDefaultSslCipher12; 1140 return kDefaultSslCipher12;
1141 } else { 1141 } else {
1142 return kDefaultSslCipher12NoAesGcm; 1142 return kDefaultSslCipher12NoAesGcm;
1143 } 1143 }
1144 #else // !OPENSSL_IS_BORINGSSL 1144 #else // !OPENSSL_IS_BORINGSSL
1145 return kDefaultSslCipher12; 1145 return kDefaultSslCipher12;
1146 #endif 1146 #endif
1147 } 1147 }
1148 } else if (key_type == KT_ECDSA) { 1148 } else if (key_type.type() == KT_ECDSA) {
1149 switch (version) { 1149 switch (version) {
1150 case SSL_PROTOCOL_TLS_10: 1150 case SSL_PROTOCOL_TLS_10:
1151 case SSL_PROTOCOL_TLS_11: 1151 case SSL_PROTOCOL_TLS_11:
1152 return kDefaultSslEcCipher10; 1152 return kDefaultSslEcCipher10;
1153 case SSL_PROTOCOL_TLS_12: 1153 case SSL_PROTOCOL_TLS_12:
1154 default: 1154 default:
1155 #ifdef OPENSSL_IS_BORINGSSL 1155 #ifdef OPENSSL_IS_BORINGSSL
1156 if (EVP_has_aes_hardware()) { 1156 if (EVP_has_aes_hardware()) {
1157 return kDefaultSslEcCipher12; 1157 return kDefaultSslEcCipher12;
1158 } else { 1158 } else {
1159 return kDefaultSslEcCipher12NoAesGcm; 1159 return kDefaultSslEcCipher12NoAesGcm;
1160 } 1160 }
1161 #else // !OPENSSL_IS_BORINGSSL 1161 #else // !OPENSSL_IS_BORINGSSL
1162 return kDefaultSslEcCipher12; 1162 return kDefaultSslEcCipher12;
1163 #endif 1163 #endif
1164 } 1164 }
1165 } else { 1165 } else {
1166 return std::string(); 1166 return std::string();
1167 } 1167 }
1168 } 1168 }
1169 1169
1170 } // namespace rtc 1170 } // namespace rtc
1171 1171
1172 #endif // HAVE_OPENSSL_SSL_H 1172 #endif // HAVE_OPENSSL_SSL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698