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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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/socket/socks_client_socket_unittest.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('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) 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 #include "net/socket/ssl_client_socket_mac.h" 5 #include "net/socket/ssl_client_socket_mac.h"
6 6
7 #include <CoreServices/CoreServices.h> 7 #include <CoreServices/CoreServices.h>
8 #include <netdb.h> 8 #include <netdb.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 void SSLClientSocketMac::DidCompleteRenegotiation() { 1125 void SSLClientSocketMac::DidCompleteRenegotiation() {
1126 DCHECK(!user_connect_callback_); 1126 DCHECK(!user_connect_callback_);
1127 renegotiating_ = false; 1127 renegotiating_ = false;
1128 next_handshake_state_ = STATE_COMPLETED_RENEGOTIATION; 1128 next_handshake_state_ = STATE_COMPLETED_RENEGOTIATION;
1129 } 1129 }
1130 1130
1131 int SSLClientSocketMac::DidCompleteHandshake() { 1131 int SSLClientSocketMac::DidCompleteHandshake() {
1132 DCHECK(!server_cert_ || renegotiating_); 1132 DCHECK(!server_cert_ || renegotiating_);
1133 VLOG(1) << "Handshake completed, next verify cert"; 1133 VLOG(1) << "Handshake completed, next verify cert";
1134 1134
1135 scoped_refptr<X509Certificate> new_server_cert = 1135 scoped_refptr<X509Certificate> new_server_cert(
1136 GetServerCert(ssl_context_); 1136 GetServerCert(ssl_context_));
1137 if (!new_server_cert) 1137 if (!new_server_cert)
1138 return ERR_UNEXPECTED; 1138 return ERR_UNEXPECTED;
1139 1139
1140 if (renegotiating_ && 1140 if (renegotiating_ &&
1141 X509Certificate::IsSameOSCert(server_cert_->os_cert_handle(), 1141 X509Certificate::IsSameOSCert(server_cert_->os_cert_handle(),
1142 new_server_cert->os_cert_handle())) { 1142 new_server_cert->os_cert_handle())) {
1143 // We already verified the server certificate. Either it is good or the 1143 // We already verified the server certificate. Either it is good or the
1144 // user has accepted the certificate error. 1144 // user has accepted the certificate error.
1145 DidCompleteRenegotiation(); 1145 DidCompleteRenegotiation();
1146 } else { 1146 } else {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 if (rv < 0 && rv != ERR_IO_PENDING) { 1273 if (rv < 0 && rv != ERR_IO_PENDING) {
1274 us->write_io_buf_ = NULL; 1274 us->write_io_buf_ = NULL;
1275 return OSStatusFromNetError(rv); 1275 return OSStatusFromNetError(rv);
1276 } 1276 }
1277 1277
1278 // always lie to our caller 1278 // always lie to our caller
1279 return noErr; 1279 return noErr;
1280 } 1280 }
1281 1281
1282 } // namespace net 1282 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket_unittest.cc ('k') | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698