Chromium Code Reviews| OLD | NEW |
|---|---|
| 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.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "crypto/ec_private_key.h" | 9 #include "crypto/ec_private_key.h" |
| 10 #include "net/ssl/server_bound_cert_service.h" | 10 #include "net/ssl/server_bound_cert_service.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool SSLClientSocket::WasNpnNegotiated() const { | 98 bool SSLClientSocket::WasNpnNegotiated() const { |
| 99 return was_npn_negotiated_; | 99 return was_npn_negotiated_; |
| 100 } | 100 } |
| 101 | 101 |
| 102 NextProto SSLClientSocket::GetNegotiatedProtocol() const { | 102 NextProto SSLClientSocket::GetNegotiatedProtocol() const { |
| 103 return protocol_negotiated_; | 103 return protocol_negotiated_; |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool SSLClientSocket::InSessionCache(std::string cache_key) { | |
| 107 // We expect to invoke this method in the SSLClientSocketOpenSSL | |
|
wtc
2014/06/13 22:47:24
This is a static method. Virtual methods cannot be
Ryan Sleevi
2014/06/13 23:24:22
Note that while Wan-Teh's suggestion is a valid ap
mshelley1
2014/06/16 19:02:49
Done.
| |
| 108 NOTREACHED(); | |
| 109 return false; | |
| 110 } | |
| 111 | |
| 106 bool SSLClientSocket::IgnoreCertError(int error, int load_flags) { | 112 bool SSLClientSocket::IgnoreCertError(int error, int load_flags) { |
| 107 if (error == OK || load_flags & LOAD_IGNORE_ALL_CERT_ERRORS) | 113 if (error == OK || load_flags & LOAD_IGNORE_ALL_CERT_ERRORS) |
| 108 return true; | 114 return true; |
| 109 | 115 |
| 110 if (error == ERR_CERT_COMMON_NAME_INVALID && | 116 if (error == ERR_CERT_COMMON_NAME_INVALID && |
| 111 (load_flags & LOAD_IGNORE_CERT_COMMON_NAME_INVALID)) | 117 (load_flags & LOAD_IGNORE_CERT_COMMON_NAME_INVALID)) |
| 112 return true; | 118 return true; |
| 113 | 119 |
| 114 if (error == ERR_CERT_DATE_INVALID && | 120 if (error == ERR_CERT_DATE_INVALID && |
| 115 (load_flags & LOAD_IGNORE_CERT_DATE_INVALID)) | 121 (load_flags & LOAD_IGNORE_CERT_DATE_INVALID)) |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 } | 210 } |
| 205 if (!server_bound_cert_service->IsSystemTimeValid()) { | 211 if (!server_bound_cert_service->IsSystemTimeValid()) { |
| 206 DVLOG(1) << "System time is not within the supported range for certificate " | 212 DVLOG(1) << "System time is not within the supported range for certificate " |
| 207 "generation, not enabling channel ID."; | 213 "generation, not enabling channel ID."; |
| 208 return false; | 214 return false; |
| 209 } | 215 } |
| 210 return true; | 216 return true; |
| 211 } | 217 } |
| 212 | 218 |
| 213 } // namespace net | 219 } // namespace net |
| OLD | NEW |