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

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

Issue 598071: Really connect to the same server in FTP network transaction. (Closed)
Patch Set: updates Created 10 years, 10 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
« no previous file with comments | « net/socket/ssl_client_socket_win.h ('k') | net/socket/tcp_client_socket_libevent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/lock.h" 10 #include "base/lock.h"
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // Unlike IsConnected, this method doesn't return a false positive. 559 // Unlike IsConnected, this method doesn't return a false positive.
560 // 560 //
561 // Strictly speaking, we should check if we have received the close_notify 561 // Strictly speaking, we should check if we have received the close_notify
562 // alert message from the server, and return false in that case. Although 562 // alert message from the server, and return false in that case. Although
563 // the close_notify alert message means EOF in the SSL layer, it is just 563 // the close_notify alert message means EOF in the SSL layer, it is just
564 // bytes to the transport layer below, so transport_->IsConnectedAndIdle() 564 // bytes to the transport layer below, so transport_->IsConnectedAndIdle()
565 // returns the desired false when we receive close_notify. 565 // returns the desired false when we receive close_notify.
566 return completed_handshake() && transport_->IsConnectedAndIdle(); 566 return completed_handshake() && transport_->IsConnectedAndIdle();
567 } 567 }
568 568
569 int SSLClientSocketWin::GetPeerName(struct sockaddr* name, socklen_t* namelen) { 569 int SSLClientSocketWin::GetPeerAddress(AddressList* address) const {
570 return transport_->GetPeerName(name, namelen); 570 return transport_->GetPeerAddress(address);
571 } 571 }
572 572
573 int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len, 573 int SSLClientSocketWin::Read(IOBuffer* buf, int buf_len,
574 CompletionCallback* callback) { 574 CompletionCallback* callback) {
575 DCHECK(completed_handshake()); 575 DCHECK(completed_handshake());
576 DCHECK(!user_read_callback_); 576 DCHECK(!user_read_callback_);
577 577
578 // If we have surplus decrypted plaintext, satisfy the Read with it without 578 // If we have surplus decrypted plaintext, satisfy the Read with it without
579 // reading more ciphertext from the transport socket. 579 // reading more ciphertext from the transport socket.
580 if (bytes_decrypted_ != 0) { 580 if (bytes_decrypted_ != 0) {
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA, success); 1331 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA, success);
1332 } 1332 }
1333 1333
1334 void SSLClientSocketWin::FreeSendBuffer() { 1334 void SSLClientSocketWin::FreeSendBuffer() {
1335 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); 1335 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer);
1336 DCHECK(status == SEC_E_OK); 1336 DCHECK(status == SEC_E_OK);
1337 memset(&send_buffer_, 0, sizeof(send_buffer_)); 1337 memset(&send_buffer_, 0, sizeof(send_buffer_));
1338 } 1338 }
1339 1339
1340 } // namespace net 1340 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_win.h ('k') | net/socket/tcp_client_socket_libevent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698