| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_OPENSSL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 int DoPayloadWrite(); | 121 int DoPayloadWrite(); |
| 122 | 122 |
| 123 int BufferSend(); | 123 int BufferSend(); |
| 124 int BufferRecv(); | 124 int BufferRecv(); |
| 125 void BufferSendComplete(int result); | 125 void BufferSendComplete(int result); |
| 126 void BufferRecvComplete(int result); | 126 void BufferRecvComplete(int result); |
| 127 void TransportWriteComplete(int result); | 127 void TransportWriteComplete(int result); |
| 128 void TransportReadComplete(int result); | 128 void TransportReadComplete(int result); |
| 129 | 129 |
| 130 bool transport_send_busy_; | 130 bool transport_send_busy_; |
| 131 scoped_refptr<DrainableIOBuffer> send_buffer_; | |
| 132 bool transport_recv_busy_; | 131 bool transport_recv_busy_; |
| 133 bool transport_recv_eof_; | 132 bool transport_recv_eof_; |
| 133 |
| 134 scoped_refptr<DrainableIOBuffer> send_buffer_; |
| 134 scoped_refptr<IOBuffer> recv_buffer_; | 135 scoped_refptr<IOBuffer> recv_buffer_; |
| 135 | 136 |
| 136 CompletionCallback user_connect_callback_; | 137 CompletionCallback user_connect_callback_; |
| 137 CompletionCallback user_read_callback_; | 138 CompletionCallback user_read_callback_; |
| 138 CompletionCallback user_write_callback_; | 139 CompletionCallback user_write_callback_; |
| 139 | 140 |
| 140 // Used by Read function. | 141 // Used by Read function. |
| 141 scoped_refptr<IOBuffer> user_read_buf_; | 142 scoped_refptr<IOBuffer> user_read_buf_; |
| 142 int user_read_buf_len_; | 143 int user_read_buf_len_; |
| 143 | 144 |
| 144 // Used by Write function. | 145 // Used by Write function. |
| 145 scoped_refptr<IOBuffer> user_write_buf_; | 146 scoped_refptr<IOBuffer> user_write_buf_; |
| 146 int user_write_buf_len_; | 147 int user_write_buf_len_; |
| 147 | 148 |
| 149 // Used by DoPayloadRead() when attempting to fill the caller's buffer with |
| 150 // as much data as possible without blocking. |
| 151 // If DoPayloadRead() encounters an error after having read some data, stores |
| 152 // the result to return on the *next* call to DoPayloadRead(). A value > 0 |
| 153 // indicates there is no pending result, otherwise 0 indicates EOF and < 0 |
| 154 // indicates an error. |
| 155 int pending_read_error_; |
| 156 |
| 148 // Set when handshake finishes. | 157 // Set when handshake finishes. |
| 149 scoped_refptr<X509Certificate> server_cert_; | 158 scoped_refptr<X509Certificate> server_cert_; |
| 150 CertVerifyResult server_cert_verify_result_; | 159 CertVerifyResult server_cert_verify_result_; |
| 151 bool completed_handshake_; | 160 bool completed_handshake_; |
| 152 | 161 |
| 153 // Stores client authentication information between ClientAuthHandler and | 162 // Stores client authentication information between ClientAuthHandler and |
| 154 // GetSSLCertRequestInfo calls. | 163 // GetSSLCertRequestInfo calls. |
| 155 bool client_auth_cert_needed_; | 164 bool client_auth_cert_needed_; |
| 156 // List of DER-encoded X.509 DistinguishedName of certificate authorities | 165 // List of DER-encoded X.509 DistinguishedName of certificate authorities |
| 157 // allowed by the server. | 166 // allowed by the server. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 184 State next_handshake_state_; | 193 State next_handshake_state_; |
| 185 NextProtoStatus npn_status_; | 194 NextProtoStatus npn_status_; |
| 186 std::string npn_proto_; | 195 std::string npn_proto_; |
| 187 std::string server_protos_; | 196 std::string server_protos_; |
| 188 BoundNetLog net_log_; | 197 BoundNetLog net_log_; |
| 189 }; | 198 }; |
| 190 | 199 |
| 191 } // namespace net | 200 } // namespace net |
| 192 | 201 |
| 193 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 202 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
| OLD | NEW |