| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ |
| 7 | 7 |
| 8 #include <Security/Security.h> | 8 #include <Security/Security.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 enum State { | 77 enum State { |
| 78 STATE_NONE, | 78 STATE_NONE, |
| 79 STATE_PAYLOAD_READ, | 79 STATE_PAYLOAD_READ, |
| 80 STATE_PAYLOAD_WRITE, | 80 STATE_PAYLOAD_WRITE, |
| 81 STATE_HANDSHAKE, | 81 STATE_HANDSHAKE, |
| 82 STATE_READ_COMPLETE, | 82 STATE_READ_COMPLETE, |
| 83 }; | 83 }; |
| 84 State next_state_; | 84 State next_state_; |
| 85 State next_io_state_; | 85 State next_io_state_; |
| 86 | 86 |
| 87 // Set when handshake finishes. |
| 88 scoped_refptr<X509Certificate> server_cert_; |
| 87 int server_cert_status_; | 89 int server_cert_status_; |
| 88 | 90 |
| 89 bool completed_handshake_; | 91 bool completed_handshake_; |
| 90 SSLContextRef ssl_context_; | 92 SSLContextRef ssl_context_; |
| 91 | 93 |
| 92 // These are buffers for holding data during I/O. The "slop" is the amount of | 94 // These are buffers for holding data during I/O. The "slop" is the amount of |
| 93 // space at the ends of the receive buffer that are allocated for holding data | 95 // space at the ends of the receive buffer that are allocated for holding data |
| 94 // but don't (yet). | 96 // but don't (yet). |
| 95 std::vector<char> send_buffer_; | 97 std::vector<char> send_buffer_; |
| 96 int pending_send_error_; | 98 int pending_send_error_; |
| 97 std::vector<char> recv_buffer_; | 99 std::vector<char> recv_buffer_; |
| 98 int recv_buffer_head_slop_; | 100 int recv_buffer_head_slop_; |
| 99 int recv_buffer_tail_slop_; | 101 int recv_buffer_tail_slop_; |
| 100 | 102 |
| 101 // This buffer holds data for Read() operations on the underlying transport | 103 // This buffer holds data for Read() operations on the underlying transport |
| 102 // (ClientSocket::Read()). | 104 // (ClientSocket::Read()). |
| 103 scoped_refptr<IOBuffer> read_io_buf_; | 105 scoped_refptr<IOBuffer> read_io_buf_; |
| 104 }; | 106 }; |
| 105 | 107 |
| 106 } // namespace net | 108 } // namespace net |
| 107 | 109 |
| 108 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ | 110 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ |
| OLD | NEW |