OLD | NEW |
1 // Copyright (c) 2008-2009 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/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 | 8 |
9 #include "base/scoped_cftyperef.h" | 9 #include "base/scoped_cftyperef.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 OSStatus status = SSLGetNegotiatedCipher(ssl_context_, &suite); | 647 OSStatus status = SSLGetNegotiatedCipher(ssl_context_, &suite); |
648 if (!status) | 648 if (!status) |
649 ssl_info->security_bits = KeySizeOfCipherSuite(suite); | 649 ssl_info->security_bits = KeySizeOfCipherSuite(suite); |
650 } | 650 } |
651 | 651 |
652 void SSLClientSocketMac::GetSSLCertRequestInfo( | 652 void SSLClientSocketMac::GetSSLCertRequestInfo( |
653 SSLCertRequestInfo* cert_request_info) { | 653 SSLCertRequestInfo* cert_request_info) { |
654 // I'm being asked for available client certs (identities). | 654 // I'm being asked for available client certs (identities). |
655 cert_request_info->host_and_port = hostname_; | 655 cert_request_info->host_and_port = hostname_; |
656 cert_request_info->client_certs.clear(); | 656 cert_request_info->client_certs.clear(); |
657 X509Certificate::GetSSLClientCertificates(&cert_request_info->client_certs); | 657 X509Certificate::GetSSLClientCertificates(hostname_, |
| 658 &cert_request_info->client_certs); |
658 } | 659 } |
659 | 660 |
660 SSLClientSocket::NextProtoStatus | 661 SSLClientSocket::NextProtoStatus |
661 SSLClientSocketMac::GetNextProto(std::string* proto) { | 662 SSLClientSocketMac::GetNextProto(std::string* proto) { |
662 proto->clear(); | 663 proto->clear(); |
663 return kNextProtoUnsupported; | 664 return kNextProtoUnsupported; |
664 } | 665 } |
665 | 666 |
666 int SSLClientSocketMac::InitializeSSLContext() { | 667 int SSLClientSocketMac::InitializeSSLContext() { |
667 OSStatus status = noErr; | 668 OSStatus status = noErr; |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 if (rv < 0 && rv != ERR_IO_PENDING) { | 1165 if (rv < 0 && rv != ERR_IO_PENDING) { |
1165 us->write_io_buf_ = NULL; | 1166 us->write_io_buf_ = NULL; |
1166 return OSStatusFromNetError(rv); | 1167 return OSStatusFromNetError(rv); |
1167 } | 1168 } |
1168 | 1169 |
1169 // always lie to our caller | 1170 // always lie to our caller |
1170 return noErr; | 1171 return noErr; |
1171 } | 1172 } |
1172 | 1173 |
1173 } // namespace net | 1174 } // namespace net |
OLD | NEW |