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

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

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 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_impl.h" 5 #include "net/socket/ssl_client_socket_impl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <openssl/bio.h> 8 #include <openssl/bio.h>
9 #include <openssl/bytestring.h> 9 #include <openssl/bytestring.h>
10 #include <openssl/err.h> 10 #include <openssl/err.h>
(...skipping 26 matching lines...) Expand all
37 #include "net/base/ip_address.h" 37 #include "net/base/ip_address.h"
38 #include "net/base/net_errors.h" 38 #include "net/base/net_errors.h"
39 #include "net/cert/cert_verifier.h" 39 #include "net/cert/cert_verifier.h"
40 #include "net/cert/ct_ev_whitelist.h" 40 #include "net/cert/ct_ev_whitelist.h"
41 #include "net/cert/ct_policy_enforcer.h" 41 #include "net/cert/ct_policy_enforcer.h"
42 #include "net/cert/ct_policy_status.h" 42 #include "net/cert/ct_policy_status.h"
43 #include "net/cert/ct_verifier.h" 43 #include "net/cert/ct_verifier.h"
44 #include "net/cert/x509_certificate_net_log_param.h" 44 #include "net/cert/x509_certificate_net_log_param.h"
45 #include "net/cert/x509_util_openssl.h" 45 #include "net/cert/x509_util_openssl.h"
46 #include "net/http/transport_security_state.h" 46 #include "net/http/transport_security_state.h"
47 #include "net/log/net_log.h"
47 #include "net/log/net_log_event_type.h" 48 #include "net/log/net_log_event_type.h"
49 #include "net/log/net_log_parameters_callback.h"
48 #include "net/ssl/scoped_openssl_types.h" 50 #include "net/ssl/scoped_openssl_types.h"
49 #include "net/ssl/ssl_cert_request_info.h" 51 #include "net/ssl/ssl_cert_request_info.h"
50 #include "net/ssl/ssl_cipher_suite_names.h" 52 #include "net/ssl/ssl_cipher_suite_names.h"
51 #include "net/ssl/ssl_client_session_cache.h" 53 #include "net/ssl/ssl_client_session_cache.h"
52 #include "net/ssl/ssl_connection_status_flags.h" 54 #include "net/ssl/ssl_connection_status_flags.h"
53 #include "net/ssl/ssl_info.h" 55 #include "net/ssl/ssl_info.h"
54 #include "net/ssl/ssl_private_key.h" 56 #include "net/ssl/ssl_private_key.h"
55 #include "net/ssl/token_binding.h" 57 #include "net/ssl/token_binding.h"
56 58
57 #if !defined(OS_NACL) 59 #if !defined(OS_NACL)
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 signature_algorithm); 1223 signature_algorithm);
1222 } 1224 }
1223 1225
1224 // Verify the certificate. 1226 // Verify the certificate.
1225 UpdateServerCert(); 1227 UpdateServerCert();
1226 next_handshake_state_ = STATE_VERIFY_CERT; 1228 next_handshake_state_ = STATE_VERIFY_CERT;
1227 return OK; 1229 return OK;
1228 } 1230 }
1229 1231
1230 int SSLClientSocketImpl::DoChannelIDLookup() { 1232 int SSLClientSocketImpl::DoChannelIDLookup() {
1231 NetLog::ParametersCallback callback = base::Bind( 1233 NetLogParametersCallback callback = base::Bind(
1232 &NetLogChannelIDLookupCallback, base::Unretained(channel_id_service_)); 1234 &NetLogChannelIDLookupCallback, base::Unretained(channel_id_service_));
1233 net_log_.BeginEvent(NetLogEventType::SSL_GET_CHANNEL_ID, callback); 1235 net_log_.BeginEvent(NetLogEventType::SSL_GET_CHANNEL_ID, callback);
1234 next_handshake_state_ = STATE_CHANNEL_ID_LOOKUP_COMPLETE; 1236 next_handshake_state_ = STATE_CHANNEL_ID_LOOKUP_COMPLETE;
1235 return channel_id_service_->GetOrCreateChannelID( 1237 return channel_id_service_->GetOrCreateChannelID(
1236 host_and_port_.host(), &channel_id_key_, 1238 host_and_port_.host(), &channel_id_key_,
1237 base::Bind(&SSLClientSocketImpl::OnHandshakeIOComplete, 1239 base::Bind(&SSLClientSocketImpl::OnHandshakeIOComplete,
1238 base::Unretained(this)), 1240 base::Unretained(this)),
1239 &channel_id_request_); 1241 &channel_id_request_);
1240 } 1242 }
1241 1243
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
2318 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED && 2320 if (ERR_GET_REASON(info->error_code) == SSL_R_TLSV1_ALERT_ACCESS_DENIED &&
2319 !certificate_requested_) { 2321 !certificate_requested_) {
2320 net_error = ERR_SSL_PROTOCOL_ERROR; 2322 net_error = ERR_SSL_PROTOCOL_ERROR;
2321 } 2323 }
2322 } 2324 }
2323 2325
2324 return net_error; 2326 return net_error;
2325 } 2327 }
2326 2328
2327 } // namespace net 2329 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698