OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ssl/openssl_ssl_util.h" | 5 #include "net/ssl/openssl_ssl_util.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include <openssl/err.h> | 9 #include <openssl/err.h> |
10 #include <openssl/ssl.h> | 10 #include <openssl/ssl.h> |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 148 } |
149 default: | 149 default: |
150 LOG(WARNING) << "Unmapped error reason: " << ERR_GET_REASON(error_code); | 150 LOG(WARNING) << "Unmapped error reason: " << ERR_GET_REASON(error_code); |
151 return ERR_SSL_PROTOCOL_ERROR; | 151 return ERR_SSL_PROTOCOL_ERROR; |
152 } | 152 } |
153 } | 153 } |
154 | 154 |
155 base::Value* NetLogOpenSSLErrorCallback(int net_error, | 155 base::Value* NetLogOpenSSLErrorCallback(int net_error, |
156 int ssl_error, | 156 int ssl_error, |
157 const OpenSSLErrorInfo& error_info, | 157 const OpenSSLErrorInfo& error_info, |
158 NetLog::LogLevel /* log_level */) { | 158 NetLogCaptureMode /* capture_mode */) { |
159 base::DictionaryValue* dict = new base::DictionaryValue(); | 159 base::DictionaryValue* dict = new base::DictionaryValue(); |
160 dict->SetInteger("net_error", net_error); | 160 dict->SetInteger("net_error", net_error); |
161 dict->SetInteger("ssl_error", ssl_error); | 161 dict->SetInteger("ssl_error", ssl_error); |
162 if (error_info.error_code != 0) { | 162 if (error_info.error_code != 0) { |
163 dict->SetInteger("error_lib", ERR_GET_LIB(error_info.error_code)); | 163 dict->SetInteger("error_lib", ERR_GET_LIB(error_info.error_code)); |
164 dict->SetInteger("error_reason", ERR_GET_REASON(error_info.error_code)); | 164 dict->SetInteger("error_reason", ERR_GET_REASON(error_info.error_code)); |
165 } | 165 } |
166 if (error_info.file != NULL) | 166 if (error_info.file != NULL) |
167 dict->SetString("file", error_info.file); | 167 dict->SetString("file", error_info.file); |
168 if (error_info.line != 0) | 168 if (error_info.line != 0) |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback( | 235 NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback( |
236 int net_error, | 236 int net_error, |
237 int ssl_error, | 237 int ssl_error, |
238 const OpenSSLErrorInfo& error_info) { | 238 const OpenSSLErrorInfo& error_info) { |
239 return base::Bind(&NetLogOpenSSLErrorCallback, | 239 return base::Bind(&NetLogOpenSSLErrorCallback, |
240 net_error, ssl_error, error_info); | 240 net_error, ssl_error, error_info); |
241 } | 241 } |
242 | 242 |
243 } // namespace net | 243 } // namespace net |
OLD | NEW |