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

Side by Side Diff: net/socket/ssl_client_socket.cc

Issue 1405383003: IsSecureTLSCipherSuite should not classify DHE_RSA as secure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "crypto/ec_private_key.h" 10 #include "crypto/ec_private_key.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 DVLOG(1) << "Elliptic Curve not supported, not enabling channel ID."; 168 DVLOG(1) << "Elliptic Curve not supported, not enabling channel ID.";
169 return false; 169 return false;
170 } 170 }
171 return true; 171 return true;
172 } 172 }
173 173
174 // static 174 // static
175 bool SSLClientSocket::HasCipherAdequateForHTTP2( 175 bool SSLClientSocket::HasCipherAdequateForHTTP2(
176 const std::vector<uint16>& cipher_suites) { 176 const std::vector<uint16>& cipher_suites) {
177 for (uint16 cipher : cipher_suites) { 177 for (uint16 cipher : cipher_suites) {
178 if (IsSecureTLSCipherSuite(cipher)) 178 if (IsTLSCipherSuiteAllowedByHTTP2(cipher))
179 return true; 179 return true;
180 } 180 }
181 return false; 181 return false;
182 } 182 }
183 183
184 // static 184 // static
185 bool SSLClientSocket::IsTLSVersionAdequateForHTTP2( 185 bool SSLClientSocket::IsTLSVersionAdequateForHTTP2(
186 const SSLConfig& ssl_config) { 186 const SSLConfig& ssl_config) {
187 return ssl_config.version_max >= SSL_PROTOCOL_VERSION_TLS1_2; 187 return ssl_config.version_max >= SSL_PROTOCOL_VERSION_TLS1_2;
188 } 188 }
(...skipping 15 matching lines...) Expand all
204 wire_protos.push_back(proto.size()); 204 wire_protos.push_back(proto.size());
205 for (const char ch : proto) { 205 for (const char ch : proto) {
206 wire_protos.push_back(static_cast<uint8_t>(ch)); 206 wire_protos.push_back(static_cast<uint8_t>(ch));
207 } 207 }
208 } 208 }
209 209
210 return wire_protos; 210 return wire_protos;
211 } 211 }
212 212
213 } // namespace net 213 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_nss.cc » ('j') | net/ssl/ssl_cipher_suite_names_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698