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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
695 bool SSLClientSocketMac::SetReceiveBufferSize(int32 size) { | 695 bool SSLClientSocketMac::SetReceiveBufferSize(int32 size) { |
696 return transport_->socket()->SetReceiveBufferSize(size); | 696 return transport_->socket()->SetReceiveBufferSize(size); |
697 } | 697 } |
698 | 698 |
699 bool SSLClientSocketMac::SetSendBufferSize(int32 size) { | 699 bool SSLClientSocketMac::SetSendBufferSize(int32 size) { |
700 return transport_->socket()->SetSendBufferSize(size); | 700 return transport_->socket()->SetSendBufferSize(size); |
701 } | 701 } |
702 | 702 |
703 void SSLClientSocketMac::GetSSLInfo(SSLInfo* ssl_info) { | 703 void SSLClientSocketMac::GetSSLInfo(SSLInfo* ssl_info) { |
704 ssl_info->Reset(); | 704 ssl_info->Reset(); |
705 if (!server_cert_) { | 705 if (!server_cert_verify_result_.verified_cert) { |
wtc
2011/07/26 00:16:35
Does this mean we can set server_cert_ to NULL as
Ryan Sleevi
2011/07/26 00:44:15
Not without further updates. The SSLClientSocket*
wtc
2011/07/26 01:37:54
Those two bugs should be marked WontFix. I rememb
Ryan Sleevi
2011/07/26 01:57:17
I agree that we shouldn't emulate the server cert
| |
706 NOTREACHED(); | 706 NOTREACHED(); |
707 return; | 707 return; |
708 } | 708 } |
709 | 709 |
710 ssl_info->cert = server_cert_; | 710 ssl_info->cert = server_cert_verify_result_.verified_cert; |
711 ssl_info->cert_status = server_cert_verify_result_.cert_status; | 711 ssl_info->cert_status = server_cert_verify_result_.cert_status; |
712 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes; | 712 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes; |
713 ssl_info->is_issued_by_known_root = | 713 ssl_info->is_issued_by_known_root = |
714 server_cert_verify_result_.is_issued_by_known_root; | 714 server_cert_verify_result_.is_issued_by_known_root; |
715 | 715 |
716 // security info | 716 // security info |
717 SSLCipherSuite suite; | 717 SSLCipherSuite suite; |
718 OSStatus status = SSLGetNegotiatedCipher(ssl_context_, &suite); | 718 OSStatus status = SSLGetNegotiatedCipher(ssl_context_, &suite); |
719 if (!status) { | 719 if (!status) { |
720 ssl_info->security_bits = KeySizeOfCipherSuite(suite); | 720 ssl_info->security_bits = KeySizeOfCipherSuite(suite); |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1378 if (rv < 0 && rv != ERR_IO_PENDING) { | 1378 if (rv < 0 && rv != ERR_IO_PENDING) { |
1379 us->write_io_buf_ = NULL; | 1379 us->write_io_buf_ = NULL; |
1380 return OSStatusFromNetError(rv); | 1380 return OSStatusFromNetError(rv); |
1381 } | 1381 } |
1382 | 1382 |
1383 // always lie to our caller | 1383 // always lie to our caller |
1384 return noErr; | 1384 return noErr; |
1385 } | 1385 } |
1386 | 1386 |
1387 } // namespace net | 1387 } // namespace net |
OLD | NEW |