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

Side by Side Diff: net/base/ssl_client_socket_mac.cc

Issue 118039: Implement SSL client authentication for Windows.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/base/ssl_client_socket_mac.h ('k') | net/base/ssl_client_socket_nss.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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008-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/base/ssl_client_socket_mac.h" 5 #include "net/base/ssl_client_socket_mac.h"
6 6
7 #include "base/singleton.h" 7 #include "base/singleton.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "net/base/ssl_info.h" 11 #include "net/base/ssl_info.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // update status 411 // update status
412 ssl_info->cert_status = server_cert_status_; 412 ssl_info->cert_status = server_cert_status_;
413 413
414 // security info 414 // security info
415 SSLCipherSuite suite; 415 SSLCipherSuite suite;
416 status = SSLGetNegotiatedCipher(ssl_context_, &suite); 416 status = SSLGetNegotiatedCipher(ssl_context_, &suite);
417 if (!status) 417 if (!status)
418 ssl_info->security_bits = KeySizeOfCipherSuite(suite); 418 ssl_info->security_bits = KeySizeOfCipherSuite(suite);
419 } 419 }
420 420
421 void SSLClientSocketMac::GetSSLCertRequestInfo(
422 SSLCertRequestInfo* cert_request_info) {
423 // TODO(wtc): implement this.
424 }
425
421 void SSLClientSocketMac::DoCallback(int rv) { 426 void SSLClientSocketMac::DoCallback(int rv) {
422 DCHECK(rv != ERR_IO_PENDING); 427 DCHECK(rv != ERR_IO_PENDING);
423 DCHECK(user_callback_); 428 DCHECK(user_callback_);
424 429
425 // since Run may result in Read being called, clear user_callback_ up front. 430 // since Run may result in Read being called, clear user_callback_ up front.
426 CompletionCallback* c = user_callback_; 431 CompletionCallback* c = user_callback_;
427 user_callback_ = NULL; 432 user_callback_ = NULL;
428 user_buf_ = NULL; 433 user_buf_ = NULL;
429 c->Run(rv); 434 c->Run(rv);
430 } 435 }
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 int rv; 741 int rv;
737 do { 742 do {
738 scoped_refptr<IOBuffer> buffer = new IOBuffer(us->send_buffer_.size()); 743 scoped_refptr<IOBuffer> buffer = new IOBuffer(us->send_buffer_.size());
739 memcpy(buffer->data(), &us->send_buffer_[0], us->send_buffer_.size()); 744 memcpy(buffer->data(), &us->send_buffer_[0], us->send_buffer_.size());
740 rv = us->transport_->Write(buffer, 745 rv = us->transport_->Write(buffer,
741 us->send_buffer_.size(), 746 us->send_buffer_.size(),
742 &us->write_callback_); 747 &us->write_callback_);
743 if (rv > 0) { 748 if (rv > 0) {
744 us->send_buffer_.erase(us->send_buffer_.begin(), 749 us->send_buffer_.erase(us->send_buffer_.begin(),
745 us->send_buffer_.begin() + rv); 750 us->send_buffer_.begin() + rv);
746
747 } 751 }
748 } while (rv > 0 && !us->send_buffer_.empty()); 752 } while (rv > 0 && !us->send_buffer_.empty());
749 753
750 if (rv < 0 && rv != ERR_IO_PENDING) { 754 if (rv < 0 && rv != ERR_IO_PENDING) {
751 return OSStatusFromNetError(rv); 755 return OSStatusFromNetError(rv);
752 } 756 }
753 757
754 // always lie to our caller 758 // always lie to our caller
755 return noErr; 759 return noErr;
756 } 760 }
757 761
758 } // namespace net 762 } // namespace net
OLDNEW
« no previous file with comments | « net/base/ssl_client_socket_mac.h ('k') | net/base/ssl_client_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698