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_win.h" | 5 #include "net/socket/ssl_client_socket_win.h" |
6 | 6 |
7 #include <schnlsp.h> | 7 #include <schnlsp.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 // | 704 // |
705 // Strictly speaking, we should check if we have received the close_notify | 705 // Strictly speaking, we should check if we have received the close_notify |
706 // alert message from the server, and return false in that case. Although | 706 // alert message from the server, and return false in that case. Although |
707 // the close_notify alert message means EOF in the SSL layer, it is just | 707 // the close_notify alert message means EOF in the SSL layer, it is just |
708 // bytes to the transport layer below, so | 708 // bytes to the transport layer below, so |
709 // transport_->socket()->IsConnectedAndIdle() returns the desired false | 709 // transport_->socket()->IsConnectedAndIdle() returns the desired false |
710 // when we receive close_notify. | 710 // when we receive close_notify. |
711 return completed_handshake() && transport_->socket()->IsConnectedAndIdle(); | 711 return completed_handshake() && transport_->socket()->IsConnectedAndIdle(); |
712 } | 712 } |
713 | 713 |
714 int SSLClientSocketWin::GetPeerAddress(AddressList* address) const { | 714 int SSLClientSocketWin::GetPeerAddress(IPEndPoint* address) const { |
715 return transport_->socket()->GetPeerAddress(address); | 715 return transport_->socket()->GetPeerAddress(address); |
716 } | 716 } |
717 | 717 |
718 int SSLClientSocketWin::GetLocalAddress(IPEndPoint* address) const { | 718 int SSLClientSocketWin::GetLocalAddress(IPEndPoint* address) const { |
719 return transport_->socket()->GetLocalAddress(address); | 719 return transport_->socket()->GetLocalAddress(address); |
720 } | 720 } |
721 | 721 |
722 void SSLClientSocketWin::SetSubresourceSpeculation() { | 722 void SSLClientSocketWin::SetSubresourceSpeculation() { |
723 if (transport_.get() && transport_->socket()) { | 723 if (transport_.get() && transport_->socket()) { |
724 transport_->socket()->SetSubresourceSpeculation(); | 724 transport_->socket()->SetSubresourceSpeculation(); |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); | 1602 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); |
1603 } | 1603 } |
1604 | 1604 |
1605 void SSLClientSocketWin::FreeSendBuffer() { | 1605 void SSLClientSocketWin::FreeSendBuffer() { |
1606 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); | 1606 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); |
1607 DCHECK(status == SEC_E_OK); | 1607 DCHECK(status == SEC_E_OK); |
1608 memset(&send_buffer_, 0, sizeof(send_buffer_)); | 1608 memset(&send_buffer_, 0, sizeof(send_buffer_)); |
1609 } | 1609 } |
1610 | 1610 |
1611 } // namespace net | 1611 } // namespace net |
OLD | NEW |