 Chromium Code Reviews
 Chromium Code Reviews Issue 4339001:
  Correctly handle SSL Client Authentication requests when connecting...  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src/
    
  
    Issue 4339001:
  Correctly handle SSL Client Authentication requests when connecting...  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src/| OLD | NEW | 
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // TODO(ukai): code is similar with http_network_transaction.cc. We should | 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should | 
| 6 // think about ways to share code, if possible. | 6 // think about ways to share code, if possible. | 
| 7 | 7 | 
| 8 #include "net/socket_stream/socket_stream.h" | 8 #include "net/socket_stream/socket_stream.h" | 
| 9 | 9 | 
| 10 #include <set> | 10 #include <set> | 
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 791 } else { | 791 } else { | 
| 792 next_state_ = STATE_CLOSE; | 792 next_state_ = STATE_CLOSE; | 
| 793 } | 793 } | 
| 794 return result; | 794 return result; | 
| 795 } | 795 } | 
| 796 | 796 | 
| 797 int SocketStream::DoSSLConnect() { | 797 int SocketStream::DoSSLConnect() { | 
| 798 DCHECK(factory_); | 798 DCHECK(factory_); | 
| 799 // TODO(agl): look into plumbing SSLHostInfo here. | 799 // TODO(agl): look into plumbing SSLHostInfo here. | 
| 800 socket_.reset(factory_->CreateSSLClientSocket( | 800 socket_.reset(factory_->CreateSSLClientSocket( | 
| 801 socket_.release(), url_.HostNoBrackets(), ssl_config_, | 801 socket_.release(), | 
| 802 NULL /* ssl_host_info */)); | 802 HostPortPair(url_.HostNoBrackets(), url_.EffectiveIntPort()), | 
| 
eroman
2010/11/12 01:12:56
Please use HostPortPair::FromURL(url)
 
Ryan Hamilton
2010/11/12 16:47:26
Done.
 | |
| 803 ssl_config_, NULL /* ssl_host_info */)); | |
| 803 next_state_ = STATE_SSL_CONNECT_COMPLETE; | 804 next_state_ = STATE_SSL_CONNECT_COMPLETE; | 
| 804 metrics_->OnSSLConnection(); | 805 metrics_->OnSSLConnection(); | 
| 805 return socket_->Connect(&io_callback_); | 806 return socket_->Connect(&io_callback_); | 
| 806 } | 807 } | 
| 807 | 808 | 
| 808 int SocketStream::DoSSLConnectComplete(int result) { | 809 int SocketStream::DoSSLConnectComplete(int result) { | 
| 809 if (IsCertificateError(result)) { | 810 if (IsCertificateError(result)) { | 
| 810 if (socket_->IsConnectedAndIdle()) { | 811 if (socket_->IsConnectedAndIdle()) { | 
| 811 result = HandleCertificateError(result); | 812 result = HandleCertificateError(result); | 
| 812 } else { | 813 } else { | 
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1022 | 1023 | 
| 1023 SSLConfigService* SocketStream::ssl_config_service() const { | 1024 SSLConfigService* SocketStream::ssl_config_service() const { | 
| 1024 return context_->ssl_config_service(); | 1025 return context_->ssl_config_service(); | 
| 1025 } | 1026 } | 
| 1026 | 1027 | 
| 1027 ProxyService* SocketStream::proxy_service() const { | 1028 ProxyService* SocketStream::proxy_service() const { | 
| 1028 return context_->proxy_service(); | 1029 return context_->proxy_service(); | 
| 1029 } | 1030 } | 
| 1030 | 1031 | 
| 1031 } // namespace net | 1032 } // namespace net | 
| OLD | NEW |