| 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_impl.h" | 5 #include "net/socket/ssl_client_socket_impl.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 187 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 188 const char* version_str; | 188 const char* version_str; |
| 189 SSLVersionToString(&version_str, | 189 SSLVersionToString(&version_str, |
| 190 SSLConnectionStatusToVersion(ssl_info.connection_status)); | 190 SSLConnectionStatusToVersion(ssl_info.connection_status)); |
| 191 dict->SetString("version", version_str); | 191 dict->SetString("version", version_str); |
| 192 dict->SetBoolean("is_resumed", | 192 dict->SetBoolean("is_resumed", |
| 193 ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME); | 193 ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME); |
| 194 dict->SetInteger("cipher_suite", SSLConnectionStatusToCipherSuite( | 194 dict->SetInteger("cipher_suite", SSLConnectionStatusToCipherSuite( |
| 195 ssl_info.connection_status)); | 195 ssl_info.connection_status)); |
| 196 | 196 |
| 197 dict->SetString("next_proto", SSLClientSocket::NextProtoToString( | 197 dict->SetString("next_proto", |
| 198 socket->GetNegotiatedProtocol())); | 198 NextProtoToString(socket->GetNegotiatedProtocol())); |
| 199 | 199 |
| 200 return std::move(dict); | 200 return std::move(dict); |
| 201 } | 201 } |
| 202 | 202 |
| 203 int GetBufferSize(const char* field_trial) { | 203 int GetBufferSize(const char* field_trial) { |
| 204 // Get buffer sizes from field trials, if possible. If values not present, | 204 // Get buffer sizes from field trials, if possible. If values not present, |
| 205 // use default. Also make sure values are in reasonable range. | 205 // use default. Also make sure values are in reasonable range. |
| 206 int buffer_size = kDefaultOpenSSLBufferSize; | 206 int buffer_size = kDefaultOpenSSLBufferSize; |
| 207 #if !defined(OS_NACL) | 207 #if !defined(OS_NACL) |
| 208 int override_buffer_size; | 208 int override_buffer_size; |
| (...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED && | 1998 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED && |
| 1999 !certificate_requested_) { | 1999 !certificate_requested_) { |
| 2000 net_error = ERR_SSL_PROTOCOL_ERROR; | 2000 net_error = ERR_SSL_PROTOCOL_ERROR; |
| 2001 } | 2001 } |
| 2002 } | 2002 } |
| 2003 | 2003 |
| 2004 return net_error; | 2004 return net_error; |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 } // namespace net | 2007 } // namespace net |
| OLD | NEW |