OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 new SSLErrorParams(net_error, status)); | 1134 new SSLErrorParams(net_error, status)); |
1135 return net_error; | 1135 return net_error; |
1136 } | 1136 } |
1137 | 1137 |
1138 int SSLClientSocketMac::DoVerifyCert() { | 1138 int SSLClientSocketMac::DoVerifyCert() { |
1139 next_handshake_state_ = STATE_VERIFY_CERT_COMPLETE; | 1139 next_handshake_state_ = STATE_VERIFY_CERT_COMPLETE; |
1140 | 1140 |
1141 DCHECK(server_cert_); | 1141 DCHECK(server_cert_); |
1142 | 1142 |
1143 VLOG(1) << "DoVerifyCert..."; | 1143 VLOG(1) << "DoVerifyCert..."; |
1144 int cert_status; | 1144 CertStatus cert_status; |
1145 if (ssl_config_.IsAllowedBadCert(server_cert_, &cert_status)) { | 1145 if (ssl_config_.IsAllowedBadCert(server_cert_, &cert_status)) { |
1146 VLOG(1) << "Received an expected bad cert with status: " << cert_status; | 1146 VLOG(1) << "Received an expected bad cert with status: " << cert_status; |
1147 server_cert_verify_result_.Reset(); | 1147 server_cert_verify_result_.Reset(); |
1148 server_cert_verify_result_.cert_status = cert_status; | 1148 server_cert_verify_result_.cert_status = cert_status; |
1149 server_cert_verify_result_.verified_cert = server_cert_; | 1149 server_cert_verify_result_.verified_cert = server_cert_; |
1150 return OK; | 1150 return OK; |
1151 } | 1151 } |
1152 | 1152 |
1153 int flags = 0; | 1153 int flags = 0; |
1154 if (ssl_config_.rev_checking_enabled) | 1154 if (ssl_config_.rev_checking_enabled) |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 if (rv < 0 && rv != ERR_IO_PENDING) { | 1415 if (rv < 0 && rv != ERR_IO_PENDING) { |
1416 us->write_io_buf_ = NULL; | 1416 us->write_io_buf_ = NULL; |
1417 return OSStatusFromNetError(rv); | 1417 return OSStatusFromNetError(rv); |
1418 } | 1418 } |
1419 | 1419 |
1420 // always lie to our caller | 1420 // always lie to our caller |
1421 return noErr; | 1421 return noErr; |
1422 } | 1422 } |
1423 | 1423 |
1424 } // namespace net | 1424 } // namespace net |
OLD | NEW |