| 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 void SSLClientSocketMac::GetSSLInfo(SSLInfo* ssl_info) { | 723 void SSLClientSocketMac::GetSSLInfo(SSLInfo* ssl_info) { |
| 724 ssl_info->Reset(); | 724 ssl_info->Reset(); |
| 725 if (!server_cert_) | 725 if (!server_cert_) |
| 726 return; | 726 return; |
| 727 | 727 |
| 728 ssl_info->cert = server_cert_; | 728 ssl_info->cert = server_cert_; |
| 729 ssl_info->cert_status = server_cert_verify_result_.cert_status; | 729 ssl_info->cert_status = server_cert_verify_result_.cert_status; |
| 730 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes; | 730 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes; |
| 731 ssl_info->is_issued_by_known_root = | 731 ssl_info->is_issued_by_known_root = |
| 732 server_cert_verify_result_.is_issued_by_known_root; | 732 server_cert_verify_result_.is_issued_by_known_root; |
| 733 ssl_info->client_cert_sent = |
| 734 ssl_config_.send_client_cert && ssl_config_.client_cert; |
| 733 | 735 |
| 734 // security info | 736 // security info |
| 735 SSLCipherSuite suite; | 737 SSLCipherSuite suite; |
| 736 OSStatus status = SSLGetNegotiatedCipher(ssl_context_, &suite); | 738 OSStatus status = SSLGetNegotiatedCipher(ssl_context_, &suite); |
| 737 if (!status) { | 739 if (!status) { |
| 738 ssl_info->security_bits = KeySizeOfCipherSuite(suite); | 740 ssl_info->security_bits = KeySizeOfCipherSuite(suite); |
| 739 ssl_info->connection_status |= | 741 ssl_info->connection_status |= |
| 740 (suite & SSL_CONNECTION_CIPHERSUITE_MASK) << | 742 (suite & SSL_CONNECTION_CIPHERSUITE_MASK) << |
| 741 SSL_CONNECTION_CIPHERSUITE_SHIFT; | 743 SSL_CONNECTION_CIPHERSUITE_SHIFT; |
| 742 } | 744 } |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 if (rv < 0 && rv != ERR_IO_PENDING) { | 1421 if (rv < 0 && rv != ERR_IO_PENDING) { |
| 1420 us->write_io_buf_ = NULL; | 1422 us->write_io_buf_ = NULL; |
| 1421 return OSStatusFromNetError(rv); | 1423 return OSStatusFromNetError(rv); |
| 1422 } | 1424 } |
| 1423 | 1425 |
| 1424 // always lie to our caller | 1426 // always lie to our caller |
| 1425 return noErr; | 1427 return noErr; |
| 1426 } | 1428 } |
| 1427 | 1429 |
| 1428 } // namespace net | 1430 } // namespace net |
| OLD | NEW |