| 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_NSS_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <certt.h> | 9 #include <certt.h> |
| 10 #include <keyt.h> | 10 #include <keyt.h> |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 int DoGetDBCertComplete(int result); | 142 int DoGetDBCertComplete(int result); |
| 143 int DoVerifyDNSSEC(int result); | 143 int DoVerifyDNSSEC(int result); |
| 144 int DoVerifyCert(int result); | 144 int DoVerifyCert(int result); |
| 145 int DoVerifyCertComplete(int result); | 145 int DoVerifyCertComplete(int result); |
| 146 int DoPayloadRead(); | 146 int DoPayloadRead(); |
| 147 int DoPayloadWrite(); | 147 int DoPayloadWrite(); |
| 148 void LogConnectionTypeMetrics() const; | 148 void LogConnectionTypeMetrics() const; |
| 149 void SaveSSLHostInfo(); | 149 void SaveSSLHostInfo(); |
| 150 | 150 |
| 151 bool DoTransportIO(); | 151 bool DoTransportIO(); |
| 152 int BufferSend(void); | 152 int BufferSend(); |
| 153 void BufferSendComplete(int result); | 153 void BufferSendComplete(int result); |
| 154 int BufferRecv(void); | 154 int BufferRecv(); |
| 155 void BufferRecvComplete(int result); | 155 void BufferRecvComplete(int result); |
| 156 | 156 |
| 157 // Handles an NSS error generated while handshaking or performing IO. | 157 // Handles an NSS error generated while handshaking or performing IO. |
| 158 // Returns a network error code mapped from the original NSS error. | 158 // Returns a network error code mapped from the original NSS error. |
| 159 int HandleNSSError(PRErrorCode error, bool handshake_error); | 159 int HandleNSSError(PRErrorCode error, bool handshake_error); |
| 160 | 160 |
| 161 // NSS calls this when checking certificates. We pass 'this' as the first | 161 // NSS calls this when checking certificates. We pass 'this' as the first |
| 162 // argument. | 162 // argument. |
| 163 static SECStatus OwnAuthCertHandler(void* arg, PRFileDesc* socket, | 163 static SECStatus OwnAuthCertHandler(void* arg, PRFileDesc* socket, |
| 164 PRBool checksig, PRBool is_server); | 164 PRBool checksig, PRBool is_server); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 unsigned int* proto_out_len, | 207 unsigned int* proto_out_len, |
| 208 unsigned int proto_max_len); | 208 unsigned int proto_max_len); |
| 209 | 209 |
| 210 // The following methods are for debugging bug 65948. Will remove this code | 210 // The following methods are for debugging bug 65948. Will remove this code |
| 211 // after fixing bug 65948. | 211 // after fixing bug 65948. |
| 212 void EnsureThreadIdAssigned() const; | 212 void EnsureThreadIdAssigned() const; |
| 213 bool CalledOnValidThread() const; | 213 bool CalledOnValidThread() const; |
| 214 | 214 |
| 215 bool transport_send_busy_; | 215 bool transport_send_busy_; |
| 216 bool transport_recv_busy_; | 216 bool transport_recv_busy_; |
| 217 bool transport_recv_eof_; |
| 217 scoped_refptr<IOBuffer> recv_buffer_; | 218 scoped_refptr<IOBuffer> recv_buffer_; |
| 218 | 219 |
| 219 scoped_ptr<ClientSocketHandle> transport_; | 220 scoped_ptr<ClientSocketHandle> transport_; |
| 220 HostPortPair host_and_port_; | 221 HostPortPair host_and_port_; |
| 221 SSLConfig ssl_config_; | 222 SSLConfig ssl_config_; |
| 222 | 223 |
| 223 CompletionCallback user_connect_callback_; | 224 CompletionCallback user_connect_callback_; |
| 224 CompletionCallback user_read_callback_; | 225 CompletionCallback user_read_callback_; |
| 225 CompletionCallback user_write_callback_; | 226 CompletionCallback user_write_callback_; |
| 226 | 227 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // Added the following code Debugging in release mode. | 308 // Added the following code Debugging in release mode. |
| 308 mutable base::Lock lock_; | 309 mutable base::Lock lock_; |
| 309 // This is mutable so that CalledOnValidThread can set it. | 310 // This is mutable so that CalledOnValidThread can set it. |
| 310 // It's guarded by |lock_|. | 311 // It's guarded by |lock_|. |
| 311 mutable base::PlatformThreadId valid_thread_id_; | 312 mutable base::PlatformThreadId valid_thread_id_; |
| 312 }; | 313 }; |
| 313 | 314 |
| 314 } // namespace net | 315 } // namespace net |
| 315 | 316 |
| 316 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 317 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |